Home »
MCQs »
JavaScript MCQs
Which JavaScript method is used to create a new array with array elements that passes a test?
70. Which JavaScript method is used to create a new array with array elements that passes a test?
- forEach()
- map()
- forMap()
- filter()
Answer: D) filter()
Explanation:
The JavaScript method filter() is used to create a new array with array elements that pass a test.