🚧 施工中
JS⟩ syntax ⟩ for loops ⟩ for await
JS ⟩ async ⟩ for await
(⭐️ ES2018)
work with streams of asynchronous events using simple loops.
(async function() { for await (const value of iterable) { ... } })();
for await...of doesn't work with async iterators that are not async iterables.
JavaScript: The Definitive Guide ⟩ Ch. 12, 13
for await...of
async iterator
async iterable
Last updated 2 years ago