Mean
EasyPrompt
Write a function mean(array) that calculates the arithmetic average of the numbers in an array. Add everything up, divide by how many there are.
If the array is empty, return NaN.
mean([1, 2, 3]); // 2mean([1, 2, 3, 4, 5]); // 3mean([10]); // 10mean([]); // NaN