- reduce<T, S, Context>(arr, cb, memo?, context?): S
Parameters
arr: readonly T[]
cb: ((this, previousValue, currentValue, currentIndex?, arr?) => S)
- (this, previousValue, currentValue, currentIndex?, arr?): S
Parameters
previousValue: S
currentValue: T
Optional
currentIndex: number
Optional
arr: readonly T[]
Returns S
Optional
memo: S
Optional
context: Context
Returns S