ArrayReduce

Run the provided udf over the array to reduce the values to a single output

Method Signature

ArrayReduce(array=[array], callback=[function], initialValue=[any])

Arguments

ArgumentTypeRequiredDescriptionDefault

array

array

true

The array to reduce

callback

function

true

The function to invoke for each item. The function will be passed 3 arguments: the accumulator, the current item, and the current index. The function should return the new accumulator value.

initialValue

any

false

The initial value of the accumulator

Examples

Last updated

Logo

Copyright & Register Trademark by Ortus Solutions, Corp & Ortus Software, LLC