JavaScript Associate — Medium
Key points
- `Array.prototype.find()` returns the first element in the array that satisfies the provided testing function.
- If no element satisfies the condition, the method returns `undefined`.
- This is different from methods like `indexOf()` which return -1 when no match is found.
Ready to go further?
Related questions
