0.2.1 • Published 5 years ago
@skt-t1-byungi/array-reduce v0.2.1
@skt-t1-byungi/array-reduce
reduce()
for old browser, in typescript.
Example
reduce([1, 2, 3], (acc, v) => acc + v)
// => 6
reduce(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