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 the numbers in between 0 and that number
function addUp(num) { if (num === 1) return 1; return num + addUp(num - 1); }
PREVIOUS
NEXT
Tagged:
#add
#numbers
#number
ADD COMMENT
Topic
COMMENT
Name
8+7 =
Submit