Created
September 22, 2017 15:21
-
-
Save sigdelsanjog/036eb066a6708ccccc6bc8293f79ba53 to your computer and use it in GitHub Desktop.
This file contains 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
module.exports = function coutndown(tick) { | |
let count = 10 | |
let timer = setInterval(_=> { | |
tick(count--) | |
if (count === -1) | |
clearInterval(timer) | |
}, 1000) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment