Easy

Calculate Shopping Cart Total with 20% Discount Using JavaScript Reduce Method

You need to calculate the total price of items in a shopping cart, applying a 20% discount to each item before summing them up. Which implementation correctly achieves this using JavaScript's reduce method?

Choose an option below