How to convert a whole array from strings to integers/numbers in javascript
<p>I need to make it so that rather than 1+1=11 my code will return 1+1=2</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;body&gt;

&lt;script&gt;
var  arr = [];                              

for (var i = 0; i &lt; 7; i++) {              
  arr.push(prompt('Enter GTIN Digit ' + (i+1))); 
}

alert('Full GTIN: ' +  (arr [0]*3)+(+ arr [2]*3)+(arr [4]*3)+(arr [6]*3) + (arr [1])+(arr [3])+ (arr [5])             );  

&lt;/script&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>