DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
Use Recursion to Create a Countdown
function countdown(n){ return n < 1 ? [] : [n].concat(countdown(n - 1)); }
Source by forum.freecodecamp.org #
PREVIOUS
NEXT
Tagged:
#Use
#Recursion
#Create
#Countdown
ADD COMMENT
Topic
COMMENT
Name
5+5 =
Submit