Optional
collection: Record<string, T>The collection to iterate over.
Optional
iteratee: AccCollectionIteratee<T, R>The function invoked per iteration.
Optional
accumulator: RThe initial value.
Returns the accumulated value.
5.12.0
[[reduce]]
const array = [[0, 1], [2, 3], [4, 5]]
reduceRight(array, (flattened, other) => flattened.concat(other), [])
// => [4, 5, 2, 3, 0, 1]
Optional
collection: ArrayLike<T>Optional
iteratee: AccCollectionIteratee<T, R>Optional
accumulator: R
This method is like
reduce
except that it iterates over elements ofcollection
from right to left.