So my code isn’t passing, and I was wondering if someone can explain to me why in the easiest terms to understand. Thanks!
Your code so far
// Only change code below this line
function countdown(n){
return (n<1)?[]
:(n>1)?[n].concat(countdown(n-1));
}
// Only change code above this line
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
Challenge: Basic JavaScript - Use Recursion to Create a Countdown
Link to the challenge: