array.sum

This function sums all element of a number array.

Syntax

array.sum(items)

Arguments

Argument

Type

Description

items

Array of type number

Input array with elements of number type.

Returns

Type

Description

float64

Sum of all elements in the array.

Examples

The function array.sum(array.create(1,2)) returns 3.