I am having an issue with a javascript for loop. I am adding up the elements of an array, but for some reason my loop adds in the first entry twice! There was a similar topic on here before (http://stackoverflow.com/questions/3121670/for-loop-repeats-first-loop-twice) but the author didn't go into his resolution in detail, just that it was "somethin stupid" he did. Can anyone tell me what I'm doing stupid??
for(j=0;j<ARRAY.length;j++)
{TOTAL += ARRAY[j];}
The output is used in a HTML table and it is displaying correctly, it's just the doubled first entry that's the issue!
Any help would be greatly appreciated.
var. Your loop will definitely not repeat the first iteration.ARRAYidentical?