Created
May 20, 2018 14:15
-
-
Save nairihar/d9644353c7548bc0183da2bb6fb85181 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
const arr1 = range(1, 3); | |
(async () => { | |
for await (let n of arr1) { | |
console.log(n); | |
} | |
})(); | |
// 1, 2, 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment