DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
5+4 =
Submit