API Reference

Returns the sum of the provided numbers and/or arrays of numbers.

function sum(...arr: (number | number[])[]): number

// Example:

sum(1, 4, 6) //=> 11

sum([1, 4, 6]) //=> 11

sum([1, 4, 6], [1, 4, 6]) //=> 22