Medium

This question is a daily question and will count towards your daily streak.

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