Returns the reduced value defined by given reducer function, which is repeatedly invoked for each value in iterable, being passed the current reduced value and the next value.
Equivalent to array.reduce.
(previousValue, currentValue, currentIndex, iterable): T
Parameters
previousValue: T
currentValue: T
currentIndex: number
iterable: Iterable<T>
Returns T
OptionalinitialValue: T
Returns T
reduce<T, U>(iterable, reducer, initialValue): U
Returns the reduced value defined by given reducer function, which is repeatedly invoked for each value in iterable, being passed the current reduced value and the next value.
Equivalent to array.reduce.
Returns the reduced value defined by given reducer function, which is repeatedly invoked for each value in iterable, being passed the current reduced value and the next value. Equivalent to array.reduce.