0 of 8 problems solved • 0%
Use in a course

Exercise prompt

Return a Value

return sends a result back to the code that called a function. The caller can store that result in a variable.

Example

function double(number) { return number * 2; } const result = double(4);

result becomes 8.

Your task

Complete makeTotal so it returns price * quantity. The existing call should display Total: 36.