Created
July 3, 2012 15:07
-
-
Save sp3c73r2038/3040320 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(a(++i), 1000); // wrong, the 1st parameters should be a function but passed a function calling by mistaken. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment