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

Exercise prompt

Combine Function Results

Returned values let several small functions contribute to one larger result.

Your task

Declare getBookPrice to return 12 and getNotebookPrice to return 5. Call both functions when calculating orderTotal, then display:

Order total: 17

Do not repeat 12 or 5 in the total expression.