🔰iteration
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
JS ⟩ iteration
three types that are related to iteration:
iterable - object that can make iterators to loop over itself.
iterator - object that can produce the next iteration result.
iteration result - object that holds the result of each step of the iteration.
custom extension
loop statements for iterations
/ / /
,
- iterators must implement next() method.
of an - iterables can make iterators.
three types that are related to the .
- object that can be iterated.
iterable iterator - an iterator that is itself iterable.
IteratorPrototype - prototype of all built-in iterators.
Iterator - extension for (built-in) iterators.
iterator - object that performs the iteration.
iteration result - object that holds the result of each step of the iteration.
Generator - objects returned by generator function.
generator function - return .