Courses / JavaScript
66. Array.prototype.find()
Returns the value of the first element in the array that satisfies the provided testing function.
1 min read Chapter 66 of 99
JavaScript
Array.prototype.find()
Array.prototype.find() helps you locate the first item in an array that meets a specific condition.
"I often need to find a specific item in an array without looping through it manually."
Array.prototype.find() returns the value of the first element in the array that satisfies a testing function, or undefined if no elements match.
"I often need to find a specific item in an array without looping through it manually."
Array.prototype.find() returns the value of the first element in the array that satisfies a testing function, or undefined if no elements match.