Skip to content

Commit ff5be2a

Browse files
authored
corrected the foreach solution of question 35
1 parent be8fef7 commit ff5be2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1284,7 +1284,7 @@ This can also achieve by forEach (allows you to keep that variable within the fo
12841284
12851285
```javascript
12861286
var arr = [10, 32, 65, 2];
1287-
arr.forEach(function(i) {
1287+
arr.forEach(function(ele, i) {
12881288
setTimeout(function() {
12891289
console.log('The index of this number is: ' + i);
12901290
}, 3000);

0 commit comments

Comments
 (0)