You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Week3/MAKEME.md
+2-7Lines changed: 2 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Topics discussed in class this week:
10
10
• Functions
11
11
```
12
12
13
-
>[Here](/Week2/README.md) you find the readings you have to complete before the third lecture.
13
+
>[Here](/Week3/README.md) you find the readings you have to complete before the third lecture.
14
14
15
15
## Step 0: Feedback
16
16
@@ -126,11 +126,6 @@ let favoriteAnimals = ['blowfish', 'capricorn', 'giraffe'];
126
126
> Don't cheat! Seriously - try it first.
127
127
128
128
129
-
Check out this [Fiddle](http://jsfiddle.net/jimschubert/85M4z/). You need to open your browser’s Developer Tools to see the console output. Press the Run button in the upper right corner to run the code.
130
-
131
-
More insights from this [Stack Overflow question](http://stackoverflow.com/questions/22395357/how-to-compare-two-arrays-are-equal-using-javascript).
132
-
133
-
134
129
16. Take a look at the following code:
135
130
136
131
```js
@@ -171,7 +166,7 @@ Please make sure you REALLY understand the exercises below:
171
166
172
167
_Deadline Sunday morning_
173
168
174
-
Go trough the reading material in the [README.md](/Week2/README.md) to prepare for your next class
169
+
Go trough the reading material in the [README.md](/Week3/README.md) to prepare for your next class
Copy file name to clipboardExpand all lines: Week6/MAKEME.md
+20-41Lines changed: 20 additions & 41 deletions
Original file line number
Diff line number
Diff line change
@@ -9,15 +9,19 @@ Topics discussed this week:
9
9
10
10
>[Here](/Week6/README.md) you find the readings you have to complete before the seventh lecture.
11
11
12
-
## Step 1: Feedback
12
+
## Step 1: Git Homework
13
+
[Go through the Git repository](https://github.com/HackYourFuture/Git/blob/master/Lecture-3.md). For handing in homework and follow the Forking workflow that is described in our lecture-3.md file of HackYourFuture’s Git repository (there is also a video that explains this).
13
14
14
-
_Deadline Monday_
15
+
16
+
## Step 2: Feedback
15
17
16
18
Give feedback on `step 2` of `week 5` to one of your fellow students (do this by creating issues in Github).
17
19
18
-
## Step 2: Git Homework
19
20
20
-
[Make these assignments](https://github.com/HackYourFuture/Git/blob/master/Lecture-3.md). For handing in homework follow the Forking workflow that is described in our lecture-3.md file of HackYourFuture’s Git repository (there is also a video that explains this).
21
+
_Deadline Monday_
22
+
23
+
Give feedback on `step 2` of `week 5` to one of your fellow students (do this by creating a pull request suggesting changes/improvements in Github).
24
+
Read through the git repository linked above to see a recap of what was covered in class this week
21
25
22
26
## Step 3: Read
23
27
@@ -34,19 +38,8 @@ Give feedback on `step 2` of `week 5` to one of your fellow students (do this by
34
38
35
39
_Deadline Wednesday_
36
40
37
-
1\.We saw that we can pass functions as arguments to other functions. Your task is to write a function that takes another function as an argument and runs it.
38
41
39
-
function foo(func) {
40
-
// What to do here?
41
-
}
42
-
43
-
function bar() {
44
-
console.log('Hello, I am bar!');
45
-
}
46
-
47
-
foo(bar);
48
-
49
-
2\.We learned a little bit about callbacks in JS. A callback is simply a function passed to another function that gets executed (run) after a potentially long running operation has completed. There is another function called `setTimeout` that will wait a specified period of time and then execute a function. For example:
42
+
1\. We learned a little bit about callbacks in JS. A callback is simply a function passed to another function that gets executed (run) after a potentially long running operation has completed. There is another function called `setTimeout` that will wait a specified period of time and then execute a function. For example:
50
43
51
44
```js
52
45
functiondoIt() {
@@ -65,10 +58,12 @@ You must write a function that takes 4 arguments.
65
58
66
59
The function should generate an array containing values from start value to end value (inclusive).
67
60
61
+
68
62
Then the function should iterate over the array and call the first callback if the array value is divisible by 3
69
63
70
64
The function should call the second callback if the array value is divisible by 5
71
65
66
+
72
67
Both functions should be called if the array value is divisible by both 3 and 5
6\. We did some work with arrays - `var arr = [1,2,3]`
93
+
5\. We did some work with arrays - `var arr = [1,2,3]`
100
94
We can also nest arrays inside arrays like this `var arr2d = [[1,2], [3,4], [5,6]]` (for math people you can think of this as a matrix)
101
95
How would you print all the items of an array with 3 dimensions?
102
96
How about with K dimensions?
103
97
What if you didn't know how deep the array was nested? (You don't have to write code for this but think about it)
104
98
105
-
7\. Here are two functions that look like they do the something similar but they print different results. Please explain what's going on here.
99
+
6\. Here are two functions that look like they do the something similar but they print different results. Please explain what's going on here.
106
100
107
101
```js
108
102
let x =9;
@@ -125,22 +119,7 @@ console.log(y);
125
119
If you are confused please run the code and then consult the Google for "javaScript pass by value pass by reference"
126
120
127
121
128
-
## Step 5: Scope and Closures
129
-
130
-
> Let's continue to learn a little more about scope and Closures.
131
-
132
-
133
-
1. Write a function that would allow you to do this:
134
-
```js
135
-
let addSix =createBase(6);
136
-
addSix(10); // returns 16
137
-
addSix(21); // returns 27
138
-
```
139
-
140
-
__Bonus__: Write a function takes this array `['a', 'b', 'c', 'd', 'a', 'e', 'f', 'c']` and returns an array which only has unique values in it (so it removes the duplicate ones). Make it a 'smart' algorithm that could do it for every array (only strings/number). Try to make it as fast as possible!
Copy file name to clipboardExpand all lines: Week7/MAKEME.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,7 @@ _Deadline Saturday_
34
34
35
35
Let's practice working with Objects and Arrays. Go to FreeCodeCamp and complete all challenges under "Object Oriented and Functional Programming" and the _first four challenges_ under "Basic Algorithm Scripting", up until 'Find the longest word in a string.'
36
36
37
+
37
38
## Step 5: Async challenge
38
39
39
40
1. Rewrite the code below to Async:
@@ -64,7 +65,6 @@ data = data.map(function (x) { return x * 8; });
Copy file name to clipboardExpand all lines: Week9/MAKEME.md
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,6 @@ Topics discussed this week:
7
7
```
8
8
9
9
## Step 1: Read
10
-
11
10
- If you need to refresh your memory on es6 classes: [es6-classes-in-depth](https://ponyfoo.com/articles/es6-classes-in-depth)
12
11
- Also read this article on scopes & closures: [explaining-javascript-scope-and-closures](https://robertnyman.com/2008/10/09/explaining-javascript-scope-and-closures/)
13
12
@@ -27,10 +26,12 @@ So please:
27
26
- Follow the instructions in the REAME.md of the above repository
28
27
- To hand in your homework you make a PR to the existing repository
29
28
29
+
30
30
## Step 4: Read before next lecture
31
31
32
32
_Deadline Sunday morning_
33
33
34
34
Go trough the reading material in the [README.md](/Week9/README.md) to prepare for your next class
35
35
36
36
> To hand in your homework, make a pull request to the original repository you forked from. Remember, our master branches are protected, you cannot push to a directly cloned repository you first have to make a fork to your own Github.
0 commit comments