agg.sumdate = function(arr){ //arr is array ['10.30', '01.45', '02.30'] arr.forEach(function(val){ }); return sum_of_hr_and_min;}