title: Am I using reduce method in a wrong way?
body: <p>In this problem, i trying to sum up the values inside an array of each object.</p>
  
  <p>I expect the output of </p>
  
  <blockquote>
    <p>[{   name: "Bob",   scores: [75] }, {   name: "Bill",   scores: [95]
    }, {   name: "Charlie",   scores: [95] }]</p>
  </blockquote>
  
  <pre><code>function winner(c1, c2, c3) {
    var customerArr = [];
    customerArr.push(c1, c2, c3);
    // console.log(customerArr);
  
    customerArr.forEach(customer =&gt; {
      customer.scores = customer.scores.reduce(function(total, scores) {
        return total + scores;
      }, 0)
      // console.log(Array.isArray(customer.scores))
    });
  
    return customerArr;
  }
  
  c1 = {
    "name": "Bob",
    "scores": [10, 65]
  }
  
  c2 = {
    "name": "Bill",
    "scores": [90, 5]
  }
  
  c3 = {
    "name": "Charlie",
    "scores": [40, 55]
  };
  
  console.log(winner(c1, c2, c2));
  </code></pre>
  
  <p>O/P:</p>
  
  <blockquote>
    <p>TypeError: customerArr[i].scores.reduce is not a function</p>
  </blockquote>