reduceArray
Created by Tomer
Import
Usage
Basic
Apply a reduce function to an array emitted by an Observable.
Examples
Example 1: Sum Array Elements
API
Inputs
reduceFn: (accumulator: R, item: T, index: number) => R
- A function to reduce each element of the array, similar to JavaScript’s.reduce()
method.initialValue: R
- The initial value for the accumulator.