Exercise 14 · Chapter: ArraysOptional+50 XP
Coin Quest: The Backpack
🪙 The hero's backpack starts with a "sword" and a "shield".
- The hero finds a
"potion"— push it - The sword breaks — remove
"sword" - 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.