Version: v0.8.1 - Beta.  We welcome contributors & feedback.

Math.sum

Math.sum($listOfNumbers) -> number

Description

Calculates the sum (addition) of all values.

Returns 0 if the list is empty.

Math.sum([2, 2])
//= 4

Math.sum([20, -10, 0.5])
//= 9.5

See Also