Policies & Guidelines

SUM

Calculate sum of an array

Description

Given an array of numbers, calculates their sum. If the array is empty, returns 0.

Function signature

SUM(values: Array) => Number

Parameter

Description

Values

Array of numeric values

Examples

Formula

Return value

SUM([10, 20, 30])

60

SUM([])

0