Medium

JavaScript: Calculate Total Price in Shopping Cart Using Array Reduce Method

You’re implementing a shopping cart where the user can add or remove items. After updating the cart, you want to calculate the total price. However, there’s an issue with how prices are being summed up. Can you spot the error?

Choose an option below