Created
January 15, 2021 01:50
-
-
Save nafeu/ff939be39cbff169b165354d5635694c 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
| async function main() { | |
| const delaysInMs = [3000, 2000, 1000]; | |
| for (const time of delaysInMs) { | |
| const result = await delay(() => `print after ${time / 1000} second(s)`, time); | |
| console.log(result); | |
| } | |
| } | |
| main(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment