Applies a reducer function to each element of the array, resulting in a single value.
reduce(0, (acc: number, curr:) => acc + curr)([1, 2, 3]) // 6 Copy
reduce(0, (acc: number, curr:) => acc + curr)([1, 2, 3]) // 6
Applies a reducer function to each element of the array, resulting in a single value.
Example