Created
December 23, 2023 20:01
-
-
Save growupanand/83805f95812b8641b68e0f298b075199 to your computer and use it in GitHub Desktop.
Fake async await in javascript
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
function timeout(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