Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function (win) {
- var index;
- function log(){
- console.log(index);
- }
- function iterate(){
- log();
- if(index>1) setTimeout(iterate, 1000);
- index--;
- }
- win.countdown = function () {
- index = 10;
- iterate();
- }
- })(this)
Add Comment
Please, Sign In to add comment