Filtering an Array with filter in Javascript


filter creates a new array with all elements that pass the test implemented by the provided function.

Source Code

let longFruits = fruits.filter(fruit => fruit.length > 5);
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments