Easy
This question is a daily question and will count towards your daily streak.
How does the .reduce() method process the following array, and what will it output? javascript Copy code
1const scores = [10, 20, 30, 40];23const finalScore = scores.reduce((acc, score, index) => {4 if (index % 2 === 0) {5 return acc + score * 2;6 } else {7 return acc - score;8 }9}, 10);1011console.log(finalScore);