Reduce not being saved in variable value

前端 未结 0 1413
别跟我提以往
别跟我提以往 2020-12-17 07:15

I am trying to use reduce to get the sum of these values:

  let test = [{foo: 234}, {foo: 122}];

   let result = test.reduce((acc, curr) => {
      return         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题