I have a List Element full of minutes and want to compute the sum of all these elements via JS. How do I need to access the different list Element, so that I can use:
Array.prototype.sum = function () {
var w = Appery('mobile_list');
var total = 0;
var i = w.length;
Code: Select all
while (i--) {
total += w[i];
}
return total;
}
(does not work)