FindIndex method returns the value of First element at which a provided function is true,
or -1
if no elements in the array satisfy the function.
array
(Array): input arraypredicate
(Function): to be run against each element of the array[thisArg]
(*): this argument in the function
(*): value of element that satisfied function.
const result = arrays.findIndex([5, 12, 8, 130, 44], (x) => x < 10);
console.log(result);
> 0