Skip to content

Instantly share code, notes, and snippets.

@steffanwilliams
Created March 3, 2011 20:17
Show Gist options
  • Save steffanwilliams/853453 to your computer and use it in GitHub Desktop.
Save steffanwilliams/853453 to your computer and use it in GitHub Desktop.
(function(container){
var index;
function log(){
console.log(index);
}
function iterate(){
log();
if(index>1) setTimeout(iterate, 1000);
index--;
}
function countdown(){
index = 10;
iterate();
}
return container.countdown = countdown;
})(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment