Problem with adding integers in an array
<p>I'm trying to loop through my totals in order to get a grand total for my web app. So far the code I am working with is the following:</p>

<pre><code>function calcAllFields() {
    var name = parseFloat($('div [name = total[]]').text());
    var totArray = $.makeArray(name);
    var total = 0;
        for (var i = 0; i &lt; totArray.length; i++) {
                total += totArray[i];
                }
    $("#target1").text(total);
}
</code></pre>

<p>Instead of adding integers, something is being read as a string. Say I want to add 200 + 50, instead of 250 I get 20050. Could anyone please point out what I'm doing wrong? Thanks!</p>
