[Top]
Array
|
Method Array.reduce()
- Method
reduce
mixed reduce(function fun, array arr, mixed|void zero)
- Description
reduce() sends the first two elements in arr to fun ,
then the result and the next element in arr to fun and
so on. Then it returns the result. The function will return
zero if arr is the empty array. If arr has
only one element, that element will be returned.
- See also
rreduce()
|