Fix the Shopping Cart Total
Fix a JavaScript cart total function so it multiplies every item's price by its quantity, includes all lines, and returns zero for an empty cart.
JavaScript
Challenge overview
- Format
- Fix the Bug
- Category
- Debugging
- Difficulty
- Beginner
arraysobjectsfunctionsreducedebugging
Keep practicing
More coding challenges
JavaScript · Beginner
Free Shipping
Combine JavaScript comparison and logical operators to decide when an order qualifies for free shipping based on total and membership.
View challengePython · Beginner
Free Shipping in Python
Combine Python logical operators to award free shipping for qualifying totals or member orders while handling every other order.
View challengeJavaScript · Beginner
Fuel Gauge
Practice a JavaScript while loop by increasing a fuel gauge in fixed steps until the tank reaches 100 percent and launch is ready.
View challenge

