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);
转载于:https://www.cnblogs.com/qzsonline/p/4167633.html