Array.reduce()
 
   
[Top]
predef::
Array

Method Array.reduce()


Method reduce

mixed Array.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()


Insert any HTML comment here. You can use any HTML tags and containers. Use <phl> ... </phl> if you'd like to insert some Pike / C examples or code.
 
HTML OK CSS