Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save djD-REK/66279195e05dc3e92a56d577ed9f961f to your computer and use it in GitHub Desktop.
Save djD-REK/66279195e05dc3e92a56d577ed9f961f to your computer and use it in GitHub Desktop.
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()
@DoctorDerek
Copy link

You bet! Thanks for the comment @TeleKiwi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment