April 2018
Beginner
536 pages
13h 21m
English
We can use the new for...await...of expression to iterate and await each of the promises returned by an asynchronous iterator:
async function func() {
for await (const x of g1()) {
console.log(x);
}
}