Reduce method is the most ___ of all array operations
general
Reduce returns
a single value
Reduce accepts ____ as argument
callback function, called the reducer
Arguments the reducer function takes…
Accumulator (acc) Current Value (cur) Current Index( idx) Source Array (src)
Optional argument to the reducer
initialValue
the first time the callback is called in reduce, accumulator and currentValue
if initialValue is provided, then accumulator = initialValue and currentValue = arr[0]
if no initialValue, then accumulator = arr[0], and currentValue = arr[1]
It is _____ an initialValue
almost always safer to provide