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 = (...input) => { input.reduce((a, b) => a + b) } // Example sum(1, 2, 3, 4) //output 10
PREVIOUS
NEXT
Tagged:
#javascript
#sum
#arguments
ADD COMMENT
Topic
COMMENT
Name
6+6 =
Submit