Created
March 25, 2012 18:05
-
-
Save korneil/2198707 to your computer and use it in GitHub Desktop.
recursive iteration
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 a(i){ | |
var aLotOfVariable; | |
iDo.some.asyncStuff(function(){ | |
// here the callstack can grow huge a(0)->a(1)->a(2)->a(3) | |
// question is how to avoid this. | |
if(i<1000) a(i+1); | |
}); | |
} | |
a(0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment