Ticket Price
JavaScript
10 pts
Ticket Price
At the Mendefera cinema, children under 12 pay 15 Nakfa and everyone else pays 30 Nakfa. Use if...else to set price from age, then print:
Ticket: 15 Nakfa
Your code must still work if someone changes age — so use a condition, do not just set the price to 15.
Checklist
- Set
priceto the right amount. - Decide with
ifandelse, usingage. - Print the ticket line.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
