Method Array.rreduce()
- Method
rreduce
mixed
rreduce(function
(:void
)fun
,array
arr
,mixed
|void
zero
)- Description
rreduce() sends the last two elements in
arr
tofun
, then the third last element inarr
and the result tofun
and so on. Then it returns the result. The function will returnzero
ifarr
is the empty array. Ifarr
has only one element, that element will be returned.- See also