Skip to content

Instantly share code, notes, and snippets.

@musha68k
Created Sep 29, 2010
Embed
What would you like to do?
var a = function(){
var index;
function log(){
console.log(index);
}
function iterate(){
log();
if(index>1) setTimeout(iterate, 1000);
index--;
}
function countdown(){
index = 10;
iterate();
}
return countdown;
}();
a();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment