title: Javascript - Summing each element of an array by index
body: <p>I have a JavaScript array:</p>
  
  <pre><code>var array1 = [ [1, 2, 3], [7, 9, 2], [6, 8, 1] ]
  </code></pre>
  
  <p>I want the output to be:</p>
  
  <pre><code>var array2 = [ 14, 19, 6 ]
  
  array1[0] = 1 + 7 + 6
  array1[1] = 2 + 9 + 8
  array1[2] = 3 + 2 + 1
  </code></pre>
  
  <p>How can I sum each element of an array by index?</p>