Course · Section 11: Working With Arrays · Lecture 160: The reduce Method
Implement `cartTotal(items)` returning the sum of `price * qty` over all items.
+ 1 hidden test run on Submit.
The total is derived state: compute it from the cart with reduce on each render rather than storing a separate, duplicable value.
Run your code to see results.