Search e01
One query across the encyclopedia, books, dictionary, papers, Wikidata and the developer library. Every hit carries its source.
6 results across 6 corpora for Symbol.asyncIterator.
Developer library 6
JavaScript reference
rayBuffer - SharedArrayBuffer - DataView - Atomics - JSON ### Managing memory - WeakRef - FinalizationRegistry ### Control abstraction objects - Iterator - AsyncIterator - Promise - GeneratorFunction - AsyncGeneratorFunction - Generator - AsyncGenerator - AsyncFunction - DisposableStack - AsyncDisposableStack ### Reflection - AbstractModuleSource - Reflect - Proxy ### Internationalization - Intl - Intl.Collat
for await...of
atements/block) to execute multiple statements. ## Description When a `for await...of` loop iterates over an iterable, it first gets the iterable's [`[Symbol.asyncIterator]()`](/docs/Web/JavaScript/Reference/Global_Objects/Symbol/asyncIterator) method and calls it, which returns an [async iterator](/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols). If the `@asyncIte
await using
ct we iterate over. Let us set this variant aside. The for await...of loop requires the `y` object to be an _async iterable_. An async iterable has a `[Symbol.asyncIterator]` method that returns an _async iterator_, whose `next()` method returns a promise representing the result. This is for when the iterable doesn't know what the next value is, or even if it's done yet, until some async operation is complete. (If `
Iteration protocols
calls to the iterator methods is wrapped in a promise. An object implements the async iterable protocol when it implements the following methods: - [`[Symbol.asyncIterator]()`](/docs/Web/JavaScript/Reference/Global_Objects/Symbol/asyncIterator) - : A zero-argument function that returns an object, conforming to the async iterator protocol. An object implements the async iterator protocol when it implements the fo
Standard built-in objects
abstraction objects Control abstractions can help to structure code, especially async code (without using deeply nested callbacks, for example). - Iterator - AsyncIterator - Promise - GeneratorFunction - AsyncGeneratorFunction - Generator - AsyncGenerator - AsyncFunction - DisposableStack - AsyncDisposableStack ### Reflection - AbstractModuleSource - Reflect - Proxy ### Internationalization Additions to the ECM
Symbol
ject asynchronously when the object goes out of scope. Used by the [`await using`](/docs/Web/JavaScript/Reference/Statements/await_using) declaration. - Symbol.asyncIterator - : A method that returns the default AsyncIterator for an object. Used by [`for await...of`](/docs/Web/JavaScript/Reference/Statements/for-await...of). - Symbol.dispose - : A method that disposes resources of the object when the object goes