DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
javascript sum of arguments
const sum = (...args) => args.reduce((a, b) => a + b); // Example sum(1, 2, 3, 4); //10
Source by 1loc.dev #
PREVIOUS
NEXT
Tagged:
#javascript
#sum
#arguments
ADD COMMENT
Topic
COMMENT
Name
1+4 =
Submit