Get sum of array columns in JavaScript
<p>We have arrays:</p>

<pre><code>[1, 2, 3, 0]
[1, 2, 3]
[1, 2]
</code></pre>

<p>Need to get a one array, indexes which is will be like a sum of columns. Expected result:</p>

<pre><code>[3, 6, 6, 0]
</code></pre>