Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

sum of odd numbers in an array javascript without loop

var total = numbers.reduce(function(total, current) {
    return total + current;
}, 0);

console.log(total);
Source by www.kirupa.com #
 
PREVIOUS NEXT
Tagged: #sum #odd #numbers #array #javascript #loop
ADD COMMENT
Topic
Name
1+3 =