average

Calculates the average of an array of numbers

Returns NaN if the input array is empty.

Example