Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3b9cec3

Browse files
committed
updated week 6 makeme
1 parent 8de8c9b commit 3b9cec3

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

Week6/MAKEME.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ _Deadline Monday_
1515

1616
Give feedback on `step 2` of `week 5` to one of your fellow students (do this by creating issues in Github).
1717

18-
## Step 2: Git Homework
18+
## ~~Step 2: Git Homework~~
1919

20-
_Deadline Saturday_
20+
~~_Deadline Saturday_~~
2121

22-
[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).
22+
~~[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).~~
2323

2424
## Step 3: Read
2525

@@ -36,6 +36,17 @@ _Deadline Saturday_
3636

3737
_Deadline Wednesday_
3838

39+
0\. 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:
40+
41+
```js
42+
function doIt() {
43+
console.log('I am done');
44+
}
45+
setTimeout(doIt, 5000)
46+
```
47+
48+
>f you run the above code it will wait 5 seconds and print `I am done`. Please read something about setTimeout on MDN. The first argument to the `setTimeout` call is the callback (`doIt`)
49+
3950
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.
4051

4152
```js
@@ -46,22 +57,15 @@ function foo(func) {
4657
function bar() {
4758
console.log('Hello, I am bar!');
4859
}
60+
61+
foo(bar);
4962
```
5063

51-
foo(bar);
5264

53-
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:
5465

55-
```js
56-
function doIt() {
57-
console.log('I am done');
58-
}
59-
setTimeout(doIt, 5000)
60-
```
6166

62-
If you run the above code it will wait 5 seconds and print `I am done`. Please read something about setTimeout on MDN. The first argument to the `setTimeout` call is the callback (`doIt`)
6367

64-
You must write a function that takes 4 arguments.
68+
2\. You must write a function that takes 4 arguments.
6569
- A start value
6670
- An end value
6771
- A callback to call if the number is divisible by 3

0 commit comments

Comments
 (0)