title: Finding the sum of subarrays
body: <p>I'm working on a very large array of subarrays full of numbers that I want to reduce into one sum for each subarray.</p>
  
  <p>Example:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var arr = [[1,2,3], [4,5,6]];
  
  arr.forEach(function(item) {
    item.reduce(function(a, b) {
      return a + b;
    });
  });
  console.log(arr);
  
  //I want arr to equal [[6], [15]];</code></pre>
  </div>
  </div>
  </p>
  
  <p>My solution just returns the original array element</p>