I am confused between the difference between the two function indexOf and find Index in an array.
The documentation says
findIndex - Returns the index of the first element in the array where predicate is true, and -1 otherwise.
and
indexOf - Returns the index of the first occurrence of a value in an array.