Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var timer = 5;
- var timerId = setTimeout(function tick() {
- console.log( "тик "+ timer);
- timer-- ;
- if(timer != 0){
- timerId = setTimeout(tick, timer*1000);
- }
- else
- console.log('stop');
- }, timer*1000);
Add Comment
Please, Sign In to add comment