Q. Which method returns the index of the first occurrence of a value in an array?

  • (A) indexOf()
  • (B) search()
  • (C) find()
  • (D) getIndex()
πŸ’¬ Discuss
βœ… Correct Answer: (A) indexOf()
Explanation: indexOf() returns the first index at which a given element is found.
Explanation by: Mr. Dubey
indexOf() returns the first index at which a given element is found.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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