Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to add up all numbers in an array

const numbers = [10, 20, 30, 40] 
add = (a, b) =>  a + b
const sum = numbers.reduce(add)
Source by medium.com #
 
PREVIOUS NEXT
Tagged: #add #numbers #array
ADD COMMENT
Topic
Name
5+4 =