findIndex < Array < JavaScript
The findIndex() method of an array returns the index number of the first no in an array that is true in the provided function. If no element is true, -1 is returned.
const numbers = [5, 12, 8, 200, 44];
const isLarge = (el) => el > 140;
const findIndex = numbers.findIndex(isLarge);
console.log(findIndex);
// 3