Declare the function average that compute the average of all the values from the given array
average
If the array is empty, average should return NaN
NaN
Example:
average([1, 1, 4]) // -> 2 average([1, 4, 8, 12]) // -> 6.25