Created
February 4, 2021 07:43
-
-
Save davidroyer/40dff6ddce3b7ca62d8cc0608a125197 to your computer and use it in GitHub Desktop.
Delay function using setTimeout with Promises
This file contains 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 delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment