Café Price List
JavaScript
10 pts
Café Price List
Create a Map called prices with these pairs, in this order: "tea" → 15, "coffee" → 20, "juice" → 30. Then print the Map, the price of coffee (read it with get()) and the size. Expected output:
Map(3) { "tea" => 15, "coffee" => 20, "juice" => 30 }
20
3
Checklist
- Create the Map
priceswith the three drinks. - Read the coffee price with
get(). - Print the Map, the coffee price and the size.
🔑 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.
