New in Formulas 2.0
The sum()
function returns the sum of its arguments. It accepts only numbers and lists of numbers, or a combination of the two.
sum(number, ...)
sum([number, ...])
sum([number], number)
Code language: JavaScript (javascript)
If using the dot notation, the numbers must be part of a list.
[number, ...].sum()
Code language: CSS (css)
Example Formulas
sum(1, 2, 3, 4, 5) /* Output: 15 */
[6, 7, 8, 9, 10].sum() /* Output: 40 */
Code language: CSS (css)