title: how to add array element values with javascript?
body: <p>I am NOT talking about adding elements together, but their values to another separate variable.</p>
  
  <p>Like this:</p>
  
  <pre><code>var TOTAL = 0;
  for (i=0; i&lt;10; i++){
  TOTAL += myArray[i]
  }
  </code></pre>
  
  <p>With this code, TOTAL doesn't add mathematically element values together, but it adds them next to eachother, so if <code>myArr[1] = 10</code> and <code>myArr[2] = 10</code> then <code>TOTAL</code> will be <code>1010</code> instead of <code>20</code>.</p>
  
  <p>How should I write what I want ?</p>
  
  <p>Thanks</p>