With ES6 you can turn Andy's solution into as a one-liner: const average = (array) => array.reduce((a, b) => a + b) / array.length; ...
確定! 回上一頁