Created
June 9, 2020 02:40
-
-
Save djD-REK/66279195e05dc3e92a56d577ed9f961f to your computer and use it in GitHub Desktop.
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
const sleep = (delay) => new Promise((resolve) => setTimeout(resolve, delay)) | |
const repeatedGreetings = async () => { | |
await sleep(1000) | |
console.log("First") | |
await sleep(1000) | |
console.log("Second") | |
await sleep(1000) | |
console.log("Third") | |
} | |
repeatedGreetings() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks for this!!!