|
|
|
Table 68: IteratorResult Interface Properties Property Value Requirements "done" Either true or false . This is the result status of an iterator
next next method call. If the end of the iterator was reached "done" is true . If the end was not reached "done" is false and a value is available. If a "done" property (either own or inherited) does not exist, it is consider to have the value false . "value" Any If done is false , this is the current iteration element value. If done is true , this is the return value of the iterator, if it supplied one. If the iterator does not have a return value, "value" is undefined . In that case, the "value" property may be absent from the conforming object if it does not inherit an explicit "value" property. The %IteratorPrototype% object: has a [[Prototype]] internal slot whose value is is an . NOTE The following steps are taken: 1. Return the this value. The value of the "name" property of this function is "[Symbol.iterator]" . The %AsyncIteratorPrototype% object: has a [[Prototype]] internal slot whose value is is an . All objects defined in this specification that implement the Iterator interface also inherit from The following expression is one way that ECMAScript code can access the %IteratorPrototype% Object .getPrototypeOf( Object .getPrototypeOf([][ Symbol .iterator]())) 27.1.2 The %IteratorPrototype% Object 27.1.2.1 %IteratorPrototype% [ @@iterator ] ( ) 27.1.3 The %AsyncIteratorPrototype% Object 752 |