๐Ÿ“šย Reference


findIndex()


arr.findIndex(callback(element[, index[, array]])[, thisArg])
const array1 = [5, 12, 8, 130, 44];

const isLargeNumber = (element) => element > 13;

console.log(array1.findIndex(isLargeNumber));
// expected output: 3