Reduces values from right, to a single value.
Alternatives: reduce, reduceRight.
Similar: map, filter, reject, reduce, accumulate.
This is part of package extra-array.
This is browserified, minified version of @extra-array/reduce-right.
It is exported as global variable array_reduceRight.
CDN: unpkg, jsDelivr.
array.reduceRight(x, fr, [acc]);
// x: an array
// fr: reduce function (acc, v, i, x)
// acc: initial value
const array = require("extra-array");
var x = [1, 2, 3, 4];
array.reduceRight(x, (acc, v) => acc+v);
// 10
array.reduceRight(x, (acc, v) => acc+v, 100);
// 110