js for loop plus number

Solutions on MaxInterview for js for loop plus number by the best coders in the world

showing results for - "js for loop plus number"
Giovanni
23 Aug 2016
1var nums = ['100','300','400','60','40'],
2    sum = nums.reduce(function(accum, val) {return accum + Number(val);}, 0);
3alert(sum);
4