Class ES6Iterator

This isn’t a built-in type. It describes the properties an object must have in order to work as an iterator since ECMAScript 2015.

API Version:

Available from version 21.2.

Note

Constructor Summary 

This class does not have a constructor, so you cannot create it directly.

Method Summary 

MethodDescription
next()Returns an iterator result object.

Methods inherited from class Object 

assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values

Method Details 

next() 

next(): Object

Returns an iterator result object.

An iterator result object can have two properties: done and value. If done is false or undefined, then the value property contains an iterator value. The value property may not be present if the value would be undefined.

After a call that returns a result where done equals true, all subsequent calls must also return done as true.


DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!