const getAverage = (arr) => arr.reduce((sum, num) => sum + num, 0) / arr.length; const arr = [5, 13, 9, 11, 10, 15, 7]; const average = getAverage(arr); console.log(average); // 10