Question · JavaScript and TypeScript course · Module 5: Advanced JavaScript
Advanced Iterations - Filter
What is the purpose of the filter() method in arrays?
Answer options
- Joins all elements into a string
- Sorts the array elements
- Removes all elements from the array
- Creates a new array with elements that satisfy a condition
You can check the correct answer by solving this task in the CodeWorlds game.