Multi-line Café Receipt
JavaScript
20 pts
Multi-line Café Receipt
Create one template literal called receipt that spans five lines, and print it with a single console.log. Use the variables from the starter in ${ } holes and calculate the prices inside the holes.
Asmara Café Customer: Senait 3 x Tea = 45 Nakfa 2 x Bun = 20 Nakfa Total: 65 Nakfa
Rules: type real line breaks in the template (not \n), write the name Senait only once (in the starter), and do not type 45, 20 or 65.
Checklist
- Create
receiptwith the exact five lines. - Insert the customer with
${ }. - Calculate every price inside the holes.
- One
console.log, real line breaks. - The receipt prints correctly.
🔑 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.
