Created
November 28, 2014 11:04
-
-
Save gsans/30e9b991336534a0ec10 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