Created
November 28, 2014 11:10
-
-
Save gsans/90f7174eb63e1cf8ba98 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fixed() { | |
for ( var i = 0; i < 5; i++ ) { | |
console.log(“Delay: “, i*100); | |
(function(safe_i) { | |
setTimeout(function() { | |
console.log(“i:”, safe_i) | |
}, i * 100 ); | |
}) (i); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment