Exerpad
🔥 0
0 XP
Exercise 14 · Chapter: ArraysOptional+50 XP

Coin Quest: The Backpack

🪙 The hero's backpack starts with a "sword" and a "shield".

  1. The hero finds a "potion" — push it
  2. The sword breaks — remove "sword"
  3. Print the bag
Expected output
shield,potion
Need a hint?
3 available · costs 5 XP each
javascript

Output
Run your code to see the output here.