Medium
How to Calculate Total Score from Array of Objects Using JavaScript Reduce Method
You need to calculate the total score from an array of player objects using the reduce method. Which approach correctly computes the total score?
1const players = [ { name: "Alice", score: 15 }, { name: "Bob", score: 25 }, { name: "Charlie", score: 10 },];