🪆 Recursion · Mission 1 of 5
🚀 Countdown
A rocket counts down from 5. Instead of a loop, a function says one number, then calls itself with the next one down.
Your mission
- Make a Function called countdown, given n.
- Inside it: if n == 0, Tell "Liftoff!" and Return. Otherwise Tell n, Call countdown(n - 1), then Return.
- From the main program, Call countdown(5). Open Values to watch the call stack.
Getting the mission ready…