adding numbers for loop javascript code example
Example 1: adding numbers in Javscript
return a+b;
Example 2: js for loop plus number
var nums = ['100','300','400','60','40'],
sum = nums.reduce(function(accum, val) {return accum + Number(val);}, 0);
alert(sum);