adding together each array within forEach loop javascript?
<p>Here is my code;</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 data = [[40, 20, 60], [20, 30, 10], [50, 75, 40]];
var averageData = [];
data.forEach(function(entries) {
    entries.reduce(function(a, b) {
        return a + b[1];
    }, 0);
    console.log(entries);
});</code></pre>
</div>
</div>
</p>

<p>I would like to be able to add the numbers from each array together.</p>

<p>But I'm not sure how I can get each array of numbers added together from the <code>forEach</code> loop?</p>

<p>From this data I would like to output instead <code>[120, 60, 165]</code>.</p>

<p>It is important that the data is within a nested array, the aim is to try get it out of the nested array onto a single line with the above output.</p>

<p>Hope someone can offer some advice!</p>

<p>Thanks</p>