Skip to content

Instantly share code, notes, and snippets.

@RuNpiXelruN
Created March 5, 2019 05:37
Show Gist options
  • Save RuNpiXelruN/2e1dd86340d169075a12dbe98e0ed259 to your computer and use it in GitHub Desktop.
Save RuNpiXelruN/2e1dd86340d169075a12dbe98e0ed259 to your computer and use it in GitHub Desktop.
simple JS timer countdown
timer () {
setTimeout(() => {
if (this.timeleft === 1) {
this.$router.push('/quote/offer')
return
}
this.timeleft--
this.timer()
}, 1000)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment