We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Reduce values from right, to a single value.
Alternatives: reduce, reduceRight. Similar: map, filter, reject, reduce.
function reduceRight(x, fr, acc?) // x: an array // fr: reduce function (acc, v, i, x) // acc: initial value
const xarray = require('extra-array'); var x = [1, 2, 3, 4]; xarray.reduceRight(x, (acc, v) => acc+v); // → 10 xarray.reduceRight(x, (acc, v) => acc+v, 100); // → 110