บอกเราว่าเกิดอะไรขึ้น:
อธิบายปัญหาของคุณโดยละเอียดที่นี่
**รหัสของคุณ**
// Only change code below this line
function countdown(n){
if (n > 0) {
return [];
} else {
const countArray = countdown(n - 1);
countArray.push(n);
return countArray;
}
}
console.log(countup(5));
// Only change code above this line
**ข้อมูลเบราว์เซอร์ของคุณ:**
ตัวแทนผู้ใช้คือ: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.1 Safari/605.1.15
Challenge: Use Recursion to Create a Countdown
ไปสู่ the challenge: