accum
accum(value1, value2, value3)
参数
value1 value2 value3
例子
accum(1, 2, 3, 4) accum(...[1, 2, 3, 4]) // => 10
源码
const accum = (...arr) => [...arr].reduce((acc, val) => acc + val, 0)
← randomNumber指定范围的随机整数 padEnd填充右侧字符 →