AsyncIterator : AsyncIterable
An AsyncIterator is an Object that returns a sequence of Promises.
Since AsyncIterators are AsyncIterables, you can use for await (const value of iterable) {}
to easily loop over the values in an AsyncIterator.
Calling an async generator function (async function* () {}
) returns an AsyncIterator.
See AsyncIterable for more details.
Example:
RunResults:
Copyright © JavaScripture Contributors