The for-await-of Statement
Finally, ES2015 introduced the for..ofstatement as a means of iterating over an iterable. Similarly, the Async Iteration proposal introduces the for..await..of statement to iterate over an async iterable:

async function f() {
 for await (const x of g()) {
    console.log(x);
 }
}

笔记

2019-02-18 00:16:06 0 28
这里是评论

相关推荐