Created
May 11, 2018 04:33
-
-
Save fodra/976722a46847e823bc441a9715801c5a to your computer and use it in GitHub Desktop.
Useful snippets of js code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // sleep using promise | |
| 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