@skt-t1-byungi/array-reduce-right
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

@skt-t1-byungi/array-reduce-right

reduceRight() for old browser, in typescript.

Example

const reducer = (acc, v) => {
  console.log(v)
  return acc + v
}
reduceRight([1, 2, 3], reducer, 0)
// 3
// 2
// 1
// => 6

reduceRight(array, reducer, [initValue])

array

Target array.

reducer

Function to execute on each element in the array. accumulates return values.

initValue

Value to use as the first argument to the first call.

License

MIT

/@skt-t1-byungi/array-reduce-right/

    Package Sidebar

    Install

    npm i @skt-t1-byungi/array-reduce-right

    Weekly Downloads

    1

    Version

    0.2.1

    License

    MIT

    Unpacked Size

    1.9 kB

    Total Files

    4

    Last publish

    Collaborators

    • skt-t1-byungi