Finding an Element in an Array with find in Javascript


find returns the first element that satisfies the provided testing function.

Source Code

let apple = fruits.find(fruit => fruit === 'apple');
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments