array.reduce()

Iterates over every entry of the given array and calls the closure with every element. This function will reduce the array to a single value and will return the value.

array.reduce( array, closure [, initialValue ] )

Returns: any

Argument Description
array
array, required

array to iterate

Alias: object

closure
function, required

function/closure that implements the following constructor [function(any result, object value, [, numericindex [, array]]):any].

Alias: function, callback, udf

initialValue
object, optional

inital value passed as part of the first closure call

Alias: initial, initalValue

Examples

There are currently no examples for this function

See also