Answers for "js for loop plus number"

0

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);
Posted by: Guest on January-08-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language