https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce
var ss = [0, 1, 2, 3, 4].reduce(function (previousValue, currentValue, index, array) { return previousValue + currentValue; }); console.log(ss);
时间: 2024-10-07 18:37:45