var arr = [3,9,4,3,6,0,9];
var sum = arr.reduce(function (prev, cur) {
console.log(prev,cur)
return prev + cur;
},0);// 0 是 初始值
var arr = [3,9,4,3,6,0,9];
var sum = arr.reduce(function (prev, cur) {
console.log(prev,cur)
return prev + cur;
},0);// 0 是 初始值