Multiple Parameters
Multiple Parameters
Functions can receive more than one input. The order of arguments matters because each argument is assigned to the matching parameter position.
Your task: Complete calculateSubtotal so it returns price multiplied by quantity. Store the subtotal for the provided notebook purchase in notebookSubtotal, then log it.
Free with a JS Exercises account
Sign in to start coding, run your solution, and keep your progress saved for later. No payment needed.
By continuing, you agree to our Terms and Privacy Policy. We'll send occasional product updates and news. You can unsubscribe anytime.
Multiple Parameters
Functions can receive more than one input. The order of arguments matters because each argument is assigned to the matching parameter position.
Your task: Complete calculateSubtotal so it returns price multiplied by quantity. Store the subtotal for the provided notebook purchase in notebookSubtotal, then log it.