From ff5be2a8fc4e76fc3204b0996403c6f34e2ba6d2 Mon Sep 17 00:00:00 2001 From: Rahul Kumar <37505384+rahuldbs@users.noreply.github.com> Date: Mon, 6 Apr 2020 21:54:11 +0530 Subject: [PATCH] corrected the foreach solution of question 35 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5e0d5f2..c222fdd 100644 --- a/README.md +++ b/README.md @@ -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);