Medium

JavaScript: Why is my async discount calculation in shopping cart returning a Promise instead of the total?

You're building a shopping cart feature and need to calculate the total price after applying a discount code. What's wrong with this implementation?

Choose an option below