const array1 = [5, 12, 50, 130, 44]; const isLarger = (element) => element > 45 ; const found = array1.findIndex(isLarger); console.log(found); //output = 2