Hi I am trying to sum an array on Javascript with the following codes.
var data[]: var total=0; data.push[x]; // x is numbers which are produced dynamically. f
Use parseInt() javascript function....
total = total + parseInt(data[i]);
This looks the 'x' which you mention come dynamically has a string type. Just check the "typeof x".