Skip to main content

Practice ยท 3 of 3

Compute the Shopping Total

Given const price = 4.5 and const quantity = 3, compute total and log a sentence using the variables, like 3 items cost 13.5. Then log whether the total is more than 10 (a boolean). Rules: - Use arithmetic on the variables โ€” no hard-coded 13.5.

Difficulty: beginner

Back to lesson: Practice: Variables: Naming Values โ€” Practice