A

Admin • 833.24K Points
Coach

Q. Which method is used to find the index of the first occurrence of a value in an array?

  • (A) indexOf()
  • (B) findIndex()
  • (C) search()
  • (D) getIndex()
  • Correct Answer - Option(A)
  • Views: 33
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin

indexOf() returns the index of the first occurrence of a specified value.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.