🍛 Hotel Kitchen · Mission 4 of 6

🚫 Sold Out!

It's a busy day: the dosas are all gone! Always check the stock before serving.

Your mission

  1. Make dishes = ["dosa", "idli", "vada", "tea"] and stock = [0, 3, 2, 5].
  2. Ask "Which dish number?" (1 is dosa, 2 is idli, 3 is vada, 4 is tea).
  3. If there's some left: serve it and take 1 from its stock.
  4. If not: say "Sorry, <dish> is sold out!"

Getting the mission ready…