Stage 2 Draft / April 4, 2020

Iterator Helpers

Contributing to this Proposal

This proposal is developed on GitHub with the help of the ECMAScript community. There are a number of ways to contribute to the development of this specification:

1 Abstract Operations

1.1 Operations on Iterator Objects

1.1.1 GetIteratorDirect ( obj )

  1. If Type(obj) is not Object, throw a TypeError exception.
  2. Let nextMethod be ? GetV(obj, "next").
  3. If IsCallable(nextMethod) is false, throw a TypeError exception.
  4. Let iteratorRecord be Record { [[Iterator]]: obj, [[NextMethod]]: nextMethod, [[Done]]: false }.
  5. Return iteratorRecord.

1.1.2 IteratorStep ( iteratorRecord [ , value ] )

  1. Let result be ? IteratorNext(iteratorRecord).
  2. If value is present, then
    1. Let result be ? IteratorNext(iteratorRecord, value).
  3. Else,
    1. Let result be ? IteratorNext(iteratorRecord).
  4. Let done be ? IteratorComplete(result).
  5. If done is true, return false.
  6. Return result.

2 Control Abstraction Objects

2.1 Iteration

2.1.1 IfAbruptCloseIterator ( value, iteratorRecord )

IfAbruptCloseIterator is a shorthand for a sequence of algorithm steps that use an Iterator Record. An algorithm step of the form:

  1. IfAbruptCloseIterator(value, iteratorRecord).

means the same thing as:

  1. If value is an abrupt completion, then
    1. Perform ? IteratorClose(iteratorRecord, value).
    2. Return value.
  2. Else if value is a Completion Record, set value to value.[[Value]].

2.1.2 The Iterator Constructor

The Iterator constructor:

  • is the initial value of the Iterator property of the global object.
  • is designed to be subclassable. It may be used as the value of an extends clause of a class defintion.

2.1.2.1 Iterator ( )

When the Iterator function is called, the following steps are taken:

  1. If NewTarget is undefined or the active function object, throw a TypeError exception.
  2. Return ? OrdinaryCreateFromConstructor(NewTarget, "%Iterator.prototype%").

2.1.2.2 Value Properties of the Iterator Constructor

2.1.2.2.1 Iterator.prototype

The initial value of Iterator.prototype is %Iterator.prototype%.

This property has the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }.

2.1.2.3 Function Properties of the Iterator Constructor

2.1.2.3.1 Iterator.from ( O )

  1. Let usingIterator be ? GetMethod(O, @@iterator).
  2. If usingIterator is not undefined,
    1. Let iteratorRecord be ? GetIterator(O, sync, usingIterator).
    2. Let hasInstance be ? OrdinaryHasInstance(%Iterator.prototype%, iteratorRecord.[[Iterator]]).
    3. If hasInstance is true, then
      1. Return iteratorRecord.[[Iterator]].
  3. Else, Let iteratorRecord be ? GetIteratorDirect(O).
  4. Let wrapper be ! ObjectCreate(%WrapForValidIteratorPrototype%, « [[Iterated]] »).
  5. Set wrapper.[[Iterated]] to iteratorRecord.
  6. Return wrapper.

2.1.2.3.1.1 The %WrapForValidIteratorPrototype% Object

2.1.2.3.1.1.1 %WrapForValidIteratorPrototype%.next ( value )

  1. Let O be this value.
  2. RequireInternalSlot(O, [[Iterated]]).
  3. If value is not present, then
    1. Return ? IteratorNext(O.[[Iterated]]).
  4. Else,
    1. Return ? IteratorNext(O.[[Iterated]], value).

2.1.2.3.1.1.2 %WrapForValidIteratorPrototype%.return ( v )

  1. Let O be this value.
  2. RequireInternalSlot(O, [[Iterated]]).
  3. Return ? IteratorClose(O.[[Iterated]], NormalCompletion(v)).

2.1.2.3.1.1.3 %WrapForValidIteratorPrototype%.throw ( v )

  1. Let O be this value.
  2. RequireInternalSlot(O, [[Iterated]]).
  3. Let iterator be O.[[Iterated]].[[Iterator]].
  4. Let throw be ? GetMethod(iterator, "throw").
  5. If throw is undefined, return ThrowCompletion(v).
  6. Otherwise, return ? Call(throw, iterator, « v »).

2.1.3 The AsyncIterator Constructor

The AsyncIterator constructor:

  • is the initial value of the AsyncIterator property of the global object.
  • is designed to be subclassable. It may be used as the value of an extends clause of a class defintion.

2.1.3.1 AsyncIterator ( )

When the AsyncIterator function is called, the following steps are taken:

  1. If NewTarget is undefined or the active function object, throw a TypeError exception.
  2. Return ? OrdinaryCreateFromConstructor(NewTarget, "%AsyncIterator.prototype%").

2.1.3.2 Value Properties of the AsyncIterator Constructor

2.1.3.2.1 AsyncIterator.prototype

The initial value of AsyncIterator.prototype is %AsyncIterator.prototype%.

This property has the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }.

2.1.3.3 Function Properties of the AsyncIterator Constructor

2.1.3.3.1 AsyncIterator.from ( O )

  1. Let usingIterator be ? GetMethod(O, @@asyncIterator).
  2. If usingIterator is not undefined,
    1. Let iteratorRecord be ? GetIterator(O, async, usingIterator).
    2. Let hasInstance be ? OrdinaryHasInstance(%AsyncIterator.prototype%, iteratorRecord.[[Iterator]]).
    3. If hasInstance is true, then
      1. Return iteratorRecord.[[Iterator]].
  3. If iteratorRecord is undefined,
    1. Set usingIterator to ? GetMethod(O, @@iterator).
    2. If usingIterator is not undefined,
      1. Let syncIteratorRecord be ? GetIterator(O, sync, usingIterator).
      2. Return ! CreateAsyncFromSyncIterator(syncIteratorRecord).
  4. If iteratorRecord is undefined, set iteratorRecord to ? GetIteratorDirect(O).
  5. Let wrapper be ! ObjectCreate(%WrapForValidAsyncIteratorPrototype%, « [[AsyncIterated]] »).
  6. Set wrapper.[[AsyncIterated]] to iteratorRecord.
  7. Return wrapper.

2.1.4 The %Iterator.prototype% Object

2.1.4.1 %Iterator.prototype%.constructor

The initial value of %Iterator.prototype%.constructor is %Iterator%.

2.1.4.2 %Iterator.prototype%.map ( mapper )

%Iterator.prototype%.map is a built-in generator function which, when called, performs the following prelude steps:

  1. Let iterated be ? GetIteratorDirect(this value).
  2. If IsCallable(mapper) is false, throw a TypeError exception.

The body of %Iterator.prototype%.map is composed of the following steps:

  1. Let lastValue be undefined.
  2. Repeat,
    1. Let next be ? IteratorStep(iterated, lastValue).
    2. If next is false, return undefined.
    3. Let value be ? IteratorValue(next).
    4. Let mapped be Call(mapper, undefined, « value »).
    5. IfAbruptCloseIterator(iterated, mapped).
    6. Set lastValue to Yield(mapped).
    7. IfAbruptCloseIterator(iterated, lastValue).

2.1.4.3 %Iterator.prototype%.filter ( filterer )

%Iterator.prototype%.filter is a built-in generator function which, when called, performs the following prelude steps:

  1. Let iterated be ? GetIteratorDirect(this value).
  2. If IsCallable(filterer) is false, throw a TypeError exception.

The body of %Iterator.prototype%.filter is composed of the following steps

  1. Let lastValue be undefined.
  2. Repeat,
    1. Let next be ? IteratorStep(iterated, lastValue).
    2. If next is false, return undefined.
    3. Let value be ? IteratorValue(next).
    4. Let selected be Call(filterer, undefined, « value »).
    5. IfAbruptCloseIterator(iterated, selected).
    6. If ToBoolean(selected) is true,
      1. Set lastValue to Yield(value).
      2. IfAbruptCloseIterator(iterated, lastValue).

2.1.4.4 %Iterator.prototype%.take ( limit )

%Iterator.prototype%.take is a built-in generator function which, when called, performs the following prelude steps:

  1. Let iterated be ? GetIteratorDirect(this value).
  2. Let remaining be ? ToInteger(limit).
  3. If remaining < 0, throw a RangeError exception.

The body of %Iterator.prototype%.take is composed of the following steps

  1. Let lastValue be undefined.
  2. Repeat,
    1. If remaining is 0, return undefined.
    2. Set remaining to remaining - 1.
    3. Let next be ? IteratorStep(iterated, lastValue).
    4. If next is false, return undefined.
    5. Set lastValue to Yield(? IteratorValue(next)).
    6. IfAbruptCloseIterator(iterated, lastValue).

2.1.4.5 %Iterator.prototype%.drop ( limit )

%Iterator.prototype%.drop is a built-in generator function which, when called, performs the following prelude steps:

  1. Let iterated be ? GetIteratorDirect(this value).
  2. Let remaining be ? ToInteger(limit).
  3. If remaining < 0, throw a RangeError exception.

The body of %Iterator.prototype%.drop is composed of the following steps:

  1. Repeat, while remaining > 0,
    1. Set remaining to remaining - 1.
    2. Let next be ? IteratorStep(iterated).
    3. If next is false, return undeifned.
  2. Let lastValue be undefined.
  3. Repeat,
    1. Let next be ? IteratorStep(iterated, lastValue).
    2. If next is false, return undefined.
    3. Set lastValue to Yield(? IteratorValue(next)).
    4. IfAbruptCloseIterator(iterated, lastValue).

2.1.4.6 %Iterator.prototype%.asIndexedPairs ( )

%Iterator.prototype%.asIndexedPairs is a built-in generator function which, when called, performs the following prelude steps:

  1. Let iterated be ? GetIteratorDirect(this value).

The body of %Iterator.prototype%.asIndexedPairs is composed of the following steps:

  1. Let index be 0.
  2. Let lastValue be undefined.
  3. Repeat,
    1. Let next be ? IteratorStep(iterated, lastValue).
    2. If next is false, return undefined.
    3. Let value be ? IteratorValue(next).
    4. Let pair be ! CreateArrayFromListindex, value »).
    5. Set index to index + 1.
    6. Set lastValue to Yield(pair).
    7. IfAbruptCloseIterator(iterated, lastValue).

2.1.4.7 %Iterator.prototype%.flatMap ( mapper )

%Iterator.prototype%.flatMap is a built-in generator function which, when called, performs the following steps:

  1. Let iterated be ? GetIteratorDirect(this value).
  2. If IsCallable(mapper) is false, throw a TypeError exception.

The body of %Iterator.prototype%.flatMap is composed of the following steps:

  1. Repeat,
    1. Let next be ? IteratorStep(iterated).
    2. If next is false, return undefined.
    3. Let value be ? IteratorValue(next).
    4. Let mapped be Call(mapper, undefined, « value »).
    5. IfAbruptCloseIterator(mapped, iterated).
    6. Let innerIterator be ? GetIterator(mapped, sync).
    7. Let innerAlive be true.
    8. Repeat, while innerAlive is true,
      1. Let innerNext be ? IteratorNext(innerIterator).
      2. If ? IteratorComplete(innerNext) is false, set innerAlive to false.
      3. Else,
        1. Let innerValue be ? IteratorValue(innerNext).
        2. Perform ? Yield(innerValue).

2.1.4.8 %Iterator.prototype%.reduce ( reducer [ , initialValue ] )

  1. Let iterated be ? GetIteratorDirect(this value).
  2. If IsCallable(reducer) is false, throw a TypeError exception.
  3. If initialValue is not present, then
    1. Let next be ? IteratorStep(iterated).
    2. If next is false, throw a TypeError exception.
    3. Let accumulator be ? IteratorValue(next).
  4. Else,
    1. Let accumulator be initialValue.
  5. Repeat,
    1. Let next be ? IteratorStep(iterated).
    2. If next is false, return accumulator.
    3. Let value be ? IteratorValue(next).
    4. Let result be Call(reducer, undefined, « accumulator, value »).
    5. IfAbruptCloseIterator(result, iterated).
    6. Set accumulator to result.[[Value]].

2.1.4.9 %Iterator.prototype%.toArray ( )

  1. Let iterated be ? GetIteratorDirect(this value).
  2. Let items be a new empty List.
  3. Repeat,
    1. Let next be ? IteratorStep(iterated).
    2. If next is false, return ! CreateArrayFromList(items).
    3. Let value be ? IteratorValue(next).
    4. Append value to items.

2.1.4.10 %Iterator.prototype%.forEach ( fn )

  1. Let iterated be ? GetIteratorDirect(this value).
  2. If IsCallable(fn) is false, throw a TypeError exception.
  3. Repeat,
    1. Let next be ? IteratorStep(iterated).
    2. If next is false, return undefined.
    3. Let value be ? IteratorValue(next).
    4. Let result be Call(fn, undefined, « value »).
    5. IfAbruptCloseIterator(result, iterated).

2.1.4.11 %Iterator.prototype%.some ( fn )

  1. Let iterated be ? GetIteratorDirect(this value).
  2. If IsCallable(fn) is false, throw a TypeError exception.
  3. Repeat,
    1. Let next be ? IteratorStep(iterated).
    2. If next is false, return false.
    3. Let value be ? IteratorValue(next).
    4. Let result be Call(fn, undefined, « value »).
    5. IfAbruptCloseIterator(result, iterated).
    6. If ToBoolean(result) is true, return true.

2.1.4.12 %Iterator.prototype%.every ( fn )

  1. Let iterated be ? GetIteratorDirect(this value).
  2. If IsCallable(fn) is false, throw a TypeError exception.
  3. Repeat,
    1. Let next be ? IteratorStep(iterated).
    2. If next is false, return true.
    3. Let value be ? IteratorValue(next).
    4. Let result be Call(fn, undefined, « value »).
    5. IfAbruptCloseIterator(result, iterated).
    6. If ToBoolean(result) is false, return false.

2.1.4.13 %Iterator.prototype%.find ( fn )

  1. Let iterated be ? GetIteratorDirect(this value).
  2. If IsCallable(fn) is false, throw a TypeError exception.
  3. Repeat,
    1. Let next be ? IteratorStep(iterated).
    2. If next is false, return undefined.
    3. Let value be ? IteratorValue(next).
    4. Let result be Call(fn, undefined, « value »).
    5. IfAbruptCloseIterator(result, iterated).
    6. If ToBoolean(result) is true, return value.

2.1.4.14 %Iterator.prototype% [ @@toStringTag ]

The initial value of the @@toStringTag property is the String value "Iterator".

This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }.

2.1.5 The %AsyncIterator.prototype% Object

2.1.5.1 %AsyncIterator.prototype%.constructor

The initial value of %AsyncIterator.prototype%.constructor is %AsyncIterator%.

2.1.5.2 %AsyncIterator.prototype%.map ( mapper )

%AsyncIterator.prototype%.map is a built-in async generator function which, when called, performs the following prelude steps:

  1. Let iterated be ? GetIteratorDirect(this value).
  2. If IsCallable(mapper) is false, throw a TypeError exception.

The body of %AsyncIterator.prototype%.map is composed of the following steps:

  1. Let lastValue be undefined.
  2. Repeat,
    1. Let next be ? Await(? IteratorNext(value, lastValue)).
    2. If ? IteratorComplete(next) is true, return undefined.
    3. Let value be ? IteratorValue(next).
    4. Let mapped be Call(mapper, undefined, « value »).
    5. IfAbruptCloseIterator(iterated, mapped).
    6. Set mapped to Await(mapped).
    7. IfAbruptCloseIterator(iterated, mapped.
    8. Set lastValue to Yield(mapped).
    9. IfAbruptCloseIterator(iterated, lastValue).

2.1.5.3 %AsyncIterator.prototype%.filter ( filterer )

%AsyncIterator.prototype%.filter is a built-in async generator function which, when called, performs the following prelude steps:

  1. Let iterated be ? GetIteratorDirect(this value).
  2. If IsCallable(filterer) is false, throw a TypeError exception.

The body of %AsyncIterator.prototype%.filter is composed of the following steps:

  1. Let lastValue be undefined.
  2. Repeat,
    1. Let next be ? Await(? IteratorNext(value, lastValue)).
    2. If ? IteratorComplete(next) is true, return undefined.
    3. Let value be ? IteratorValue(next).
    4. Let selected be Call(filterer, undefined, « value »).
    5. IfAbruptCloseIterator(iterated, selected).
    6. Set selected to Await(selected).
    7. IfAbruptCloseIterator(iterated, selected).
    8. If ToBoolean(selected) is true, then
      1. Set lastValue to Yield(value).
      2. IfAbruptCloseIterator(iterated, lastValue).

2.1.5.4 %AsyncIterator.prototype%.take ( limit )

%AsyncIterator.prototype%.take is a built-in async generator function which, when called, performs the following prelude steps:

  1. Let iterated be ? GetIteratorDirect(this value).
  2. Let remaining be ? ToInteger(limit).
  3. If remaining < 0, throw a RangeError exception.

The body of %AsyncIterator.prototype%.take is composed of the following steps:

  1. Let lastValue be undefined.
  2. Repeat,
    1. If remaining is 0, return undefined.
    2. Set remaining to remaining - 1.
    3. Let next be ? Await(? IteratorNext(iterated, lastValue)).
    4. If ? IteratorComplete(next) is true, return undefined.
    5. Set lastValue to Yield(? IteratorValue(next)).
    6. IfAbruptCloseIterator(iterated, lastValue).

2.1.5.5 %AsyncIterator.prototype%.drop ( limit )

%AsyncIterator.prototype%.drop is a built-in async generator function which, when called, performs the following prelude steps:

  1. Let iterated be ? GetIteratorDirect(this value).
  2. Let remaining be ? ToInteger(limit).
  3. If remaining < 0, throw a RangeError exception.

The body of %AsyncIterator.prototype%.drop is composed of the following steps:

  1. Repeat, while remaining > 0,
    1. Set remaining to remaining - 1.
    2. Let next be ? Await(? IteratorNext(iterated)).
    3. If ? IteratorComplete(next) is true, return undeifned.
  2. Let lastValue be undefined.
  3. Repeat,
    1. Let next be ? Await(? IteratorNext(iterated, lastValue)).
    2. If ? IteratorComplete(next) is true, return undefined.
    3. Set lastValue to Yield(? IteratorValue(next)).
    4. IfAbruptCloseIterator(iterated, lastValue).

2.1.5.6 %AsyncIterator.prototype%.asIndexedPairs ( )

%AsyncIterator.prototype%.asIndexedPairs is a built-in async generator function which, when called, performs the following prelude steps:

  1. Let iterated be ? GetIteratorDirect(this value).

The body of %AsyncIterator.prototype%.asIndexedPairs is composed of the following steps:

  1. Let index be 0.
  2. Let lastValue be undefined.
  3. Repeat,
    1. Let next be ? Await(? IteratorNext(iterated, lastValue)).
    2. If ? IteratorComplete(next is true, return undefined.
    3. Let value be ? IteratorValue(next).
    4. Let pair be ! CreateArrayFromListindex, value »).
    5. Set index to index + 1.
    6. Set lastValue to Yield(pair).
    7. IfAbruptCloseIterator(iterated, lastValue).

2.1.5.7 %AsyncIterator.prototype%.flatMap ( mapper )

%AsyncIterator.prototype%.flatMap is a built-in async generator function which, when called, performs the following steps:

  1. Let iterated be ? GetIteratorDirect(this value).
  2. If IsCallable(mapper) is false, throw a TypeError exception.

The body of %AsyncIterator.prototype%.flatMap is composed of the following steps:

  1. Repeat,
    1. Let next be ? Await(? IteratorNext(iterated)).
    2. If ? IteratorComplete(next) is true, return undefined.
    3. Let value be ? IteratorValue(next).
    4. Let mapped be Call(mapper, undefined, « value »).
    5. IfAbruptCloseIterator(iterated, mapped).
    6. Set mapped to Await(mapped).
    7. IfAbruptCloseIterator(iterated, mapped).
    8. Let innerIterator be ? GetIterator(mapped, async).
    9. Let innerAlive be true.
    10. Repeat, while innerAlive is true,
      1. Let innerNext be ? Await(? IteratorNext(innerIterator)).
      2. If ? IteratorComplete(innerNext) is true, set innerAlive to false.
      3. Else,
        1. Let innerValue be ? IteratorValue(innerNext).
        2. Perform ? Yield(innerValue).

2.1.5.8 %AsyncIterator.prototype%.reduce ( reducer [ , initialValue ] )

  1. Let iterated be ? GetIteratorDirect(this value).
  2. If IsCallable(reducer) is false, throw a TypeError exception.
  3. If initialValue is not present, then
    1. Let next be ? Await(? IteratorNext(iterated)).
    2. If ? IteratorComplete(next) is true, throw a TypeError exception.
    3. Let accumulator be ? IteratorValue(next).
  4. Else,
    1. Let accumulator be initialValue.
  5. Repeat,
    1. Let next be ? Await(? IteratorNext(iterated)).
    2. If ? IteratorComplete(next) is true, return accumulator.
    3. Let value be ? IteratorValue(next).
    4. Let result be Call(reducer, undefined, « accumulator, value »).
    5. IfAbruptCloseIterator(iterated, result).
    6. Set result to Await(result).
    7. IfAbruptCloseIterator(iterated, result).
    8. Set accumulator to result.

2.1.5.9 %AsyncIterator.prototype%.toArray ( )

%AsyncIterator.prototype%.toArray is a built-in async function which, when called, performs the following steps:

  1. Let iterated be ? GetIteratorDirect(this value).
  2. Let items be a new empty List.
  3. Repeat,
    1. Let next be ? Await(? IteratorNext(iterated)).
    2. If ? IteratorComplete(next) is true, return ! CreateArrayFromList(items).
    3. Let value be ? IteratorValue(next).
    4. Append value to items.

2.1.5.10 %AsyncIterator.prototype%.forEach ( fn )

%AsyncIterator.prototype%.forEach is a built-in async function which, when called, performs the following steps:

  1. Let iterated be ? GetIteratorDirect(this value).
  2. If IsCallable(fn) is false, throw a TypeError exception.
  3. Repeat,
    1. Let next be ? Await(? IteratorNext(iterated)).
    2. If ? IteratorComplete(next) is true, return undefined.
    3. Let value be ? IteratorValue(next).
    4. Let r be Call(fn, undefined, « value »).
    5. IfAbruptCloseIterator(iterated, r).
    6. Set r to Await(r).
    7. IfAbruptCloseIterator(iterated, r).

2.1.5.11 %AsyncIterator.prototype%.some ( fn )

%AsyncIterator.prototype%.some is a built-in async function which, when called, performs the following steps:

  1. Let iterated be ? GetIteratorDirect(this value).
  2. If IsCallable(fn) is false, throw a TypeError exception.
  3. Repeat,
    1. Let next be ? Await(? IteratorNext(iterated)).
    2. If ? IteratorComplete(next) is true, return false.
    3. Let value be ? IteratorValue(next).
    4. Let result be Call(fn, undefined, « value »).
    5. IfAbruptCloseIterator(iterated, result).
    6. Set result to Await(result).
    7. IfAbruptCloseIterator(iterated, result).
    8. If ToBoolean(result) is true, return true.

2.1.5.12 %AsyncIterator.prototype%.every ( fn )

%AsyncIterator.prototype%.every is a built-in async function which, when called, performs the following steps:

  1. Let iterated be ? GetIteratorDirect(this value).
  2. If IsCallable(fn) is false, throw a TypeError exception.
  3. Repeat,
    1. Let next be ? Await(? IteratorNext(iterated)).
    2. If ? IteratorComplete(next) is true, return true.
    3. Let value be ? IteratorValue(next).
    4. Let result be Call(fn, undefined, « value »).
    5. IfAbruptCloseIterator(iterated, result).
    6. Set result to Await(result).
    7. IfAbruptCloseIterator(iterated, result).
    8. If ToBoolean(result) is false, return false.

2.1.5.13 %AsyncIterator.prototype%.find ( fn )

%AsyncIterator.prototype%.find is a built-in async function which, when called, performs the following steps:

  1. Let iterated be ? GetIteratorDirect(this value).
  2. If IsCallable(fn) is false, throw a TypeError exception.
  3. Repeat,
    1. Let next be ? Await(? IteratorNext(iterated)).
    2. If ? IteratorComplete(next) is true, return undefined.
    3. Let value be ? IteratorValue(next).
    4. Let result be Call(fn, undefined, « value »).
    5. IfAbruptCloseIterator(iterated, result).
    6. Set result to Await(result).
    7. IfAbruptCloseIterator(iterated, result).
    8. If ToBoolean(result) is true, return value.

2.1.5.14 %AsyncIterator.prototype% [ @@toStringTag ]

The initial value of the @@toStringTag property is the String value "Async Iterator".

This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }.