Array.prototype.findIndex()
The findIndex()
method returns the index of the first element in the array that satisfies the provided testing function. Otherwise, it returns -1
, indicating that no element passed the test.
Last updated
Was this helpful?