Skip to content

Commit

Permalink
Merge pull request ganqqwerty#93 from rahuldbs/patch-1
Browse files Browse the repository at this point in the history
corrected the foreach solution of question 35
  • Loading branch information
ganqqwerty authored Jun 9, 2020
2 parents be8fef7 + ff5be2a commit 5821df8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ This can also achieve by forEach (allows you to keep that variable within the fo
```javascript
var arr = [10, 32, 65, 2];
arr.forEach(function(i) {
arr.forEach(function(ele, i) {
setTimeout(function() {
console.log('The index of this number is: ' + i);
}, 3000);
Expand Down

0 comments on commit 5821df8

Please sign in to comment.