Created
June 2, 2020 19:01
-
-
Save Deepak13245/629c8cf3d2178a5d0ce04ae8ba0fe1c7 to your computer and use it in GitHub Desktop.
Sleep function in javascript
This file contains 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
function sleep(timeout) { | |
return new Promise(resolve => setTimeout(resolve, timeout)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment