js reduce语法
<script>
let buf = [10, 110, 20, 120, 30, 130];
// value记录上次结果
let mapBuf = buf.reduce(function(value, n) {
console.log(value, n);
return 100 + n;
}, 0)
console.log(mapBuf);
</script>
let mapBuf = buf.reduce(function(value, n) {
console.log(value, n);
return value + n;
}, 0)