Skip to content

Instantly share code, notes, and snippets.

@sigdelsanjog
Created September 22, 2017 15:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sigdelsanjog/036eb066a6708ccccc6bc8293f79ba53 to your computer and use it in GitHub Desktop.
Save sigdelsanjog/036eb066a6708ccccc6bc8293f79ba53 to your computer and use it in GitHub Desktop.
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