Tell us what’s happening:
Describe your issue in detail here.
my cade is doing what it is supposed to do then why is the compiler showing an error
**Your code so far**
// Only change code below this line
var array = [];
function countdown(n){
if(n<1){
return [];
} else {
array.push(n)
countdown(n-1);
return array;
}
}
countdown(10);
console.log(array)
// Only change code above this line
**Your browser information:**
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15
Challenge: Use Recursion to Create a Countdown
Link to the challenge: