Skip to content

Commit

Permalink
corrected the foreach solution of question 35
Browse files Browse the repository at this point in the history
  • Loading branch information
rahuldbs authored Apr 6, 2020
1 parent be8fef7 commit ff5be2a
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 ff5be2a

Please sign in to comment.