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

Coin Quest: The addCoins Function

🪙 Grabbing coins happens everywhere in the game — perfect job for a function.

Define addCoins(coins, amount) that returns coins + amount. Then print addCoins(20, 10) and addCoins(0, 5).

Expected output
30
5
Need a hint?
3 available · costs 5 XP each
javascript

Output
Run your code to see the output here.