js array.reduce

array.reduce(function(acc,val){

  return acc + val;

},0)

累加数组。

原文地址:https://www.cnblogs.com/sy-liu/p/6645143.html