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
// define | |
const delay = ms => new Promise(res => setTimeout(res, ms)) | |
// call | |
await delay(5000) |