Last active
October 1, 2018 15:20
-
-
Save lukakostic/85b0d3bb745f60c54f0762860d29177b to your computer and use it in GitHub Desktop.
await sleep(2000); //2 sec
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
async function sleep(x) { | |
return new Promise(resolve => { | |
setTimeout(() =>{resolve(x);},x); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment