Update 09_day_higher_order_functions.md

pull/320/head
yendoz 3 years ago committed by GitHub
parent 6bbd2fe2eb
commit e5b4a89285
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -102,7 +102,7 @@ console.log(sumArray(numbers))
``` ```
```sh ```sh
15 10
``` ```
The above example can be simplified as follows: The above example can be simplified as follows:
@ -122,7 +122,7 @@ console.log(sumArray(numbers))
``` ```
```sh ```sh
15 10
``` ```
### Setting time ### Setting time
@ -191,10 +191,8 @@ arr.forEach((element, index, arr) => console.log(index, element, arr))
``` ```
```js ```js
let sum = 0;
const numbers = [1, 2, 3, 4, 5]; const numbers = [1, 2, 3, 4, 5];
numbers.forEach(num => console.log(num)) numbers.forEach(num => console.log(num))
console.log(sum)
``` ```
```sh ```sh

Loading…
Cancel
Save