Question · JavaScript and TypeScript course · Module 5: Advanced JavaScript
Advanced Iterations - Reduce
What does the reduce() method do in JavaScript?
Answer options
- Reduces the array size by half
- Sorts the array in ascending order
- Reduces the array to a single value using an accumulator function
- Removes duplicates from the array
You can check the correct answer by solving this task in the CodeWorlds game.