2 * A specialized version of `_.reduceRight` for arrays without support for
3 * callback shorthands and `this` binding.
6 * @param {Array} array The array to iterate over.
7 * @param {Function} iteratee The function invoked per iteration.
8 * @param {*} [accumulator] The initial value.
9 * @param {boolean} [initFromArray] Specify using the last element of `array`
10 * as the initial value.
11 * @returns {*} Returns the accumulated value.
13 function arrayReduceRight(array, iteratee, accumulator, initFromArray) {
14 var length = array.length;
15 if (initFromArray && length) {
16 accumulator = array[--length];
19 accumulator = iteratee(accumulator, array[length], length, array);
24 module.exports = arrayReduceRight;