find, findIndex
Searching arrays.
Examples
find()
Finding the first element greater than 18.
const numbers = [4, 9, 16, 25, 29];
let first = numbers.find(myFunction);
function myFunction(value, index, array) {
return value > 18;
}
console.log(first); // 25Test Your Knowledge
JavaScript Quiz
No quiz available for this topic yet.