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.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…