Skip to content

Instantly share code, notes, and snippets.

@brianswisher
Created August 14, 2017 22:46
Show Gist options
  • Save brianswisher/60bbb00b79815913934166dfb4d7bee9 to your computer and use it in GitHub Desktop.
Save brianswisher/60bbb00b79815913934166dfb4d7bee9 to your computer and use it in GitHub Desktop.
Wait w/ a promise
function wait (delay = 1000) {
return new Promise((resolve) => {
setTimeout(() => {
resolve()
}, delay)
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment