Question · JavaScript and TypeScript course · Module 5: Advanced JavaScript
Array Transformation with map()
Which array method transforms each element and returns a new array?
Answer options
- filter() - filters elements by a condition
- map() - transforms each element and returns a new array
- reduce() - reduces the array to a single value
- forEach() - executes a function on each element, does not return a new array
You can check the correct answer by solving this task in the CodeWorlds game.