DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
js sum of int in array
const sum = [1, 2, 3].reduce((partialSum, a) => partialSum + a, 0); console.log(sum); // 6
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#js
#sum
#int
#array
ADD COMMENT
Topic
COMMENT
Name
5+9 =
Submit