Value type yielded by the iterator.
Key type yielded with each value.
ProtectedbaseDelegates traversal to the bound owner.
Callback result that should stop traversal early.
Callback invoked for each value.
breakFlag when traversal stops early, otherwise !breakFlag.
Tests whether every value passes callback.
Predicate invoked for each value.
true when all values pass the predicate.
Filters values into a new array.
Predicate invoked for each value.
Values that pass the predicate in iteration order.
Finds the first value that passes callback.
Predicate invoked for each value.
First matching value, or undefined when none match.
Finds the zero-based iteration index of the first matching value.
Predicate invoked for each value.
First matching iteration index, or -1 when none match.
Invokes callback for each value.
Function invoked for each value.
Maps each value to a new array.
Result value type.
Function that maps each value.
Mapped values in iteration order.
Reduces values by using the first iterated value as the initial accumulator.
Reducer invoked for each value after the first.
Reduced value, or undefined when the iterator is empty.
Tests whether at least one value passes callback.
Predicate invoked for each value.
true when any value passes the predicate.
Default traversal implementation for unbound iterators.
Regular users normally call traversal helpers such as forEach instead of this method. Collection owners provide the concrete traversal implementation.
Chainable iterator helper for collection-like objects.
Remarks
An iterator delegates actual traversal to its owner, allowing collection implementations to control ordering while sharing common helpers such as
map,filter, andreduce.Example