Skip to content

Instantly share code, notes, and snippets.

@musha68k
Created September 29, 2010 18:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save musha68k/603257 to your computer and use it in GitHub Desktop.
Save musha68k/603257 to your computer and use it in GitHub Desktop.
var a = function(){
var index;
function log(){
console.log(index);
}
function iterate(){
log();
if(index>1) setTimeout(iterate, 1000);
index--;
}
return function(){
index = 10;
iterate();
}
}();
a();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment