Shopping Cart Total
Use JavaScript reduce() to total a shopping cart by multiplying each item's price by its quantity, including an empty cart total of zero.
JavaScript
Challenge overview
- Format
- Build a Function
- Category
- JavaScript
- Difficulty
- Intermediate
javascriptarrayshigher-order-array-methodsreduceaccumulator
Keep practicing
More coding challenges
HTML & CSS · Intermediate
Style a Responsive Pricing Card with Tailwind
Style an unformatted subscription card with responsive Tailwind utilities, including a featured badge and accessible interaction states.
View challengeHTML & CSS · Beginner
Style an Event Card
Style a semantic HTML event card with foundational CSS spacing, borders, colors, and a clear deadline badge in the browser preview.
View challengeJavaScript · Intermediate
Summarize Orders by Status
Use JavaScript reduce() to group orders by dynamic status values, calculating each group's count and total without changing the source data.
View challenge

