Skip to content

Instantly share code, notes, and snippets.

@Linuxpizi
Created August 12, 2019 12:58
Show Gist options
  • Save Linuxpizi/8121050a36e87637d44e6ee579b1cc82 to your computer and use it in GitHub Desktop.
Save Linuxpizi/8121050a36e87637d44e6ee579b1cc82 to your computer and use it in GitHub Desktop.
add js sleep function
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms))
sleep(2000).then(() => console.log("over"))
@Linuxpizi
Copy link
Author

add js sleep function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment