@extra-array/reduce-right.min
TypeScript icon, indicating that this package has built-in type declarations

2.10.19 • Public • Published

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


References

Package Sidebar

Install

npm i @extra-array/reduce-right.min

Weekly Downloads

146

Version

2.10.19

License

MIT

Unpacked Size

5.92 kB

Total Files

8

Last publish

Collaborators

  • wolfram77