average
average(value1, value2, value3)
参数
value
例子
average(...[1, 2, 3]) average(1, 2, 3) // => 2
源码
const average = (...nums) => nums.reduce((acc, val) => acc + val, 0) / nums.length
← averageBy检查数组对象各项相等 getLineSize计算两点之间的距离 →