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()
πŸ’¬ Discuss
βœ… Correct Answer: (A) indexOf()
Explanation: indexOf() returns the index of the first occurrence of a specified value.
Explanation by: Mr. Dubey
indexOf() returns the index of the first occurrence of a specified value.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
87
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
86%
Success Rate