Medium

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

You are given an array of objects representing products in an e-commerce store. Each object contains the properties name, price, and discount. Write a function to calculate the final total cost of all the products after applying their respective discounts.

Choose an option below