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
Try this one:
var total = 0; for (var i = 0; i < someArray.length; i++) { total += someArray[i] << 0; }