0 of 8 problems solved • 0%

Exercise prompt

Return a Value

return ends a function call and sends a result back to its caller.

Example

function double(number) { return number * 2; } const result = double(4);
  • double(4) calculates and returns 8.
  • const result = ... stores that returned value.

Returning does not display the result. To display it, use console.log(result).

Your task

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