Write countdown(n) returning [n, n-1, …, 1] using a while loop.
countdown(n)
[n, n-1, …, 1]
while
countdown(3) → [3, 2, 1]
countdown(0) → []
Submit runs 4 tests, including hidden edge cases.
Run your code to see the output here.