Created
November 11, 2024 10:21
-
-
Save premrajah/3a24c7484c1d1f89cc936d05269d8cf6 to your computer and use it in GitHub Desktop.
Delayed setTimeout for testing JS
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
// REMOVE | |
const sleep = (ms) => new Promise((r) => setTimeout(r, ms)); | |
const test = async () => { | |
await sleep(500); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment