Created
May 20, 2018 14:09
-
-
Save nairihar/9794c05a19f0dbce64985b3eb2da7216 to your computer and use it in GitHub Desktop.
Async Generator, Async Iterator in NodeJS v10, medium
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* range(start, stop) { | |
for (let i = start; i <= stop; i++) { | |
yield i; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment