Update 09_day_higher_order_functions.md

sum variable was never used in this 'forEach' Callback function that is why it never got updated, which means output should be 1,2,3,4,5,0. However, There is no necessary to use sum variable in it to understand the 'forEach' callback function.

I hope it is helpful.
Thank You
pull/377/head
Yash Patel 3 years ago committed by GitHub
parent a63597bc65
commit d4c63959be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -191,10 +191,8 @@ arr.forEach((element, index, arr) => console.log(index, element, arr))
```
```js
let sum = 0;
const numbers = [1, 2, 3, 4, 5];
numbers.forEach(num => console.log(num))
console.log(sum)
```
```sh

Loading…
Cancel
Save