function array_sum(array) { var i; var result = 0; for (i=0; i