Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
delay using await
// define
const delay = ms => new Promise(res => setTimeout(res, ms))
// call
await delay(5000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.