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

Skip to content

Commit 613b9be

Browse files
committed
fixed intentation week6
1 parent 034e18b commit 613b9be

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

Week6/MAKEME.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -28,39 +28,40 @@ _Deadline Wednesday_
2828

2929
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:
3030

31-
```js
32-
function doIt() {
33-
console.log('I am done');
34-
}
35-
setTimeout(doIt, 5000)
36-
```
37-
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`)
38-
39-
You must write a function that takes 4 arguments.
31+
```js
32+
function doIt() {
33+
console.log('I am done');
34+
}
35+
setTimeout(doIt, 5000)
36+
```
37+
38+
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`)
39+
40+
You must write a function that takes 4 arguments.
4041
- A start value
4142
- An end value
4243
- A callback to call if the number is divisible by 3
4344
- A callback to use if the number is divisible by 5
4445

45-
The function should generate an array containing values from start value to end value (inclusive).
46+
The function should generate an array containing values from start value to end value (inclusive).
4647

47-
Then the function should iterate over the array and call the second argument if the array value is divisible by 3
48+
Then the function should iterate over the array and call the second argument if the array value is divisible by 3
4849

49-
The function should call the second argument if the array value is divisible by 5
50+
The function should call the second argument if the array value is divisible by 5
5051

51-
Both functions should be called if the array value is divisible by both 3 and 5
52+
Both functions should be called if the array value is divisible by both 3 and 5
5253

53-
```js
54-
THIS IS FAKE CODE
55-
function threeFive(startIndex, stopIndex, threeCallback, fiveCallback) {
56-
// make array
57-
// start at beginning of array and check if you should call threeCallback or fiveCallback or go on to next
58-
}
59-
threeFive(10, 15, sayThree, sayFive);
54+
```js
55+
THIS IS FAKE CODE
56+
function threeFive(startIndex, stopIndex, threeCallback, fiveCallback) {
57+
// make array
58+
// start at beginning of array and check if you should call threeCallback or fiveCallback or go on to next
59+
}
60+
threeFive(10, 15, sayThree, sayFive);
6061

61-
// Should create an array [10,11,12,13,14,15]
62-
// and call sayFive, sayThree, sayThree, sayFive - please make sure you see why these calls are made before you start coding
63-
```
62+
// Should create an array [10,11,12,13,14,15]
63+
// and call sayFive, sayThree, sayThree, sayFive - please make sure you see why these calls are made before you start coding
64+
```
6465

6566

6667
2\. Please solve this problem using:

0 commit comments

Comments
 (0)