🔰iteration result

JSiteration ⟩ iteration result

object with value / done properties that holds the result of each step of the iteration.

{ value: 1, done: false }    // iteration result example

such an object is said to be implementing the IteratorResult interface.

if a result without either value or done is returned, it's effectively equivalent to:

{ done: false, value: undefined }

Last updated