_.reduceRight()
_.reduceRight(collection, [iteratee=_.identity], [accumulator])
This method is like _.reduce except that it iterates over elements of collection from right to left.
Arguments
collection (Array|Object)
: The collection to iterate over.
[iteratee=_.identity] (Function)
: The function invoked per iteration.
[accumulator] (*)
: The initial value.
Returns
(*)
: Returns the accumulated value.