Answers for "for (var i = 0; i < 3; i++) { setTimeout(function() { console.log(i); }, 1000 + i); }"

0

for (var i = 0; i < 3; i++) { setTimeout(function() { console.log(i); }, 1000 + i); }

for (var i = 0; i < 3; i++) {
  setTimeout(function() { alert(i); }, 1000 + i);
}
Posted by: Guest on September-10-2021
-1

for (var i = 0; i < 10; i++) { setTimeout(function () { console.log(i) }, 10) } What

for (var i = 0; i < 10; i++) {
setTimeout(
(function (i) {
console.log(i)
})(i),
10
)
}
Posted by: Guest on December-11-2020

Code answers related to "for (var i = 0; i < 3; i++) { setTimeout(function() { console.log(i); }, 1000 + i); }"

Code answers related to "Javascript"

Browse Popular Code Answers by Language