Created
July 3, 2012 15:13
-
-
Save sp3c73r2038/3040356 to your computer and use it in GitHub Desktop.
loop for calling a function
This file contains hidden or 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
var a = function (i) { | |
console.log(i) | |
setTimeout(function () { | |
a(++i); | |
}, 1000); // now correct | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment