Skip to content

Instantly share code, notes, and snippets.

@osbornm
Created March 8, 2020 20:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save osbornm/7075633893a4b12b0fc5b3739d06a7cc to your computer and use it in GitHub Desktop.
Save osbornm/7075633893a4b12b0fc5b3739d06a7cc to your computer and use it in GitHub Desktop.
Async Timeout Function (JavaScript)
function timeout(ms = 1000) {
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