Skip to content

sum

sum(array)

Returns the sum of all numbers in array.

ts
sum([1, 2, 3, 4]); // 10
ts
pipe([1, 2, 3, 4], sum()); // 10