Created
January 14, 2018 22:02
-
-
Save schahriar/5f734f3bdcb2c301fc005295e97fb308 to your computer and use it in GitHub Desktop.
Control flow timers in action #async-await #medium
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 z = async () => { | |
await x(); | |
await timeoutPromise(1000); // Wait 1 second | |
// You can recurse z if needed | |
return y(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment