sum

Calculates the sum of an array of numbers.

Returns NaN if the input array is empty.

Example