Methods
-
<static> reduce(srcArray, reduce, accumulator)
Invokes in series an async reducer function on each item in the given source Array.
-
Invokes in series an async reducer function on each item in the given source Array. The reducer function transforms an
accumulator
value based on each item iterated overParameters:
Name Type Description srcArray
Array Specifies the source array to reduce over.
reduce
function Specifies the async function that will be called with (accumulator, currValue, index, array) as arguments and returns a new value for accumulator.
accumulator
* Specifies the initial accumulator value
Returns:
Returns a promise to be resolved containing final accumulator value.
- Type
- Promise