Skip to content

Instantly share code, notes, and snippets.

@ccondry
Created December 6, 2019 17:45
Show Gist options
  • Save ccondry/2d655efed9fa4b38d1270aa246a23d96 to your computer and use it in GitHub Desktop.
Save ccondry/2d655efed9fa4b38d1270aa246a23d96 to your computer and use it in GitHub Desktop.
async sleep for JavaScript
function sleep (ms) {
return new Promise(resolve => setTimeout(resolve, ms))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment