Exerpad
🔥 0
0 XP
Exercise 11 · Chapter: ObjectsOptional+50 XP

Coin Quest: Hero Stats

🪙 Real game data lives in objects. The hero starts as { name: "Alex", coins: 30 }.

  1. The hero levels up — add the key level with the value 2
  2. They find 10 more coins — update coins to 40
  3. Print name, coins, and level on one line, separated by spaces
Expected output
Alex 40 2
Need a hint?
3 available · costs 5 XP each
javascript

Output
Run your code to see the output here.