Café Order Detective
JavaScript
20 pts
Café Order Detective
An order form at Asmara Café sent these values (copy them from the starter):
let cups = "3"; let price = 15; let paid = true; let note = null; let table;
Your job:
- Print each variable’s name and type, like
console.log("cups:", typeof cups); - Show the bug: print
"Joined:"andcups + price. - Create
totalascups * priceand print"Total:"andtotal. - Print
"total is a"and the type oftotal.
Expected output:
cups: string price: number paid: boolean note: object table: undefined Joined: 315 Total: 45 total is a number
Checklist
- Print the type of each of the five variables.
- Show the joined value
cups + price. - Create
totalby multiplying. - All eight lines match.
🔑 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.
