Asynchronously reduces an array to a single accumulated value.
Each iteration awaits the result of the provided async reducer function before continuing. This allows for sequential async transformations over array items.
Type of elements in the input array.
Type of the accumulated result.
The array to iterate over.
An async reducer function called for each element.
The initial accumulator value.
A promise that resolves to the final accumulated result.
const result = await reduceAsync( [1, 2, 3], async (acc, val) => acc + val, 0);console.log(result); // 6 Copy
const result = await reduceAsync( [1, 2, 3], async (acc, val) => acc + val, 0);console.log(result); // 6
1.1.0
Asynchronously reduces an array to a single accumulated value.
Each iteration awaits the result of the provided async reducer function before continuing. This allows for sequential async transformations over array items.