Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
settimeout-iif.js
function tellMeLater() {
for (var i = 0; i < 10; i++) {
(function(i) {
setTimeout(function() {
console.log(i);
}, 100);
}(i));
}
}
tellMeLater();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.