Created
March 8, 2012 20:19
-
-
Save mstudio/2003173 to your computer and use it in GitHub Desktop.
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 main = function() { | |
var _index; | |
function iterate() { | |
console.log(_index); | |
if (_index > 1) | |
setTimeout(iterate, 1000); | |
_index--; | |
} | |
return { | |
countdown : function() { | |
_index = 10; | |
iterate(); | |
} | |
}; | |
}(); | |
main.countdown(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment