0.2.1 • Published 5 years ago

@skt-t1-byungi/array-reduce-right v0.2.1

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

@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

0.2.1

5 years ago

0.2.0

5 years ago

0.1.1

6 years ago

0.1.0

6 years ago