Café Receipt
JavaScript
20 pts
Café Receipt
Selam buys 3 cups of tea at 15 Nakfa each and 2 pieces of bread at 10 Nakfa each. Print this receipt exactly:
Asmara Café Tea: 45 Bread: 20 Total: 65
Rules: the numbers 45, 20 and 65 must be calculated by JavaScript (use 3 * 15, 2 * 10 and 3 * 15 + 2 * 10). Print the label and the number in one console.log() by giving it two values separated by a comma: console.log("Tea:", 3 * 15); — the console puts one space between them.
Checklist
- Print the café name, then the Tea, Bread and Total lines.
- Let JavaScript calculate every price (no typed answers).
🔑 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.
