The method _______ returns the index of the first element in the array that satisfies the provided testing function.

  • findIndex()
  • indexOf()
  • search()
  • locateIndex()
The findIndex() method is used to find the index of the first element in an array that satisfies a provided testing function. It iterates through the array, executing the function for each element until a match is found or it reaches the end of the array.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *