Language concepts
Iterator next() contract
Advances an iterator and returns an iteration result object. Some iterators, notably generators, interpret a supplied value; ordinary array iterators ignore it.
Formal Syntax & Structure
javascript syntaxjavascript
iterator.next([value])Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| value | any | Optional input, protocol dependent. |
Return Value
object
Iteration result.
Working Example
Example Snippetjavascript
console.log(JSON.stringify([9].values().next()));