Q. Which method is used to find the index of the first occurrence of a value in an array?
β
Correct Answer: (A)
indexOf()
Explanation: indexOf() returns the index of the first occurrence of a specified value.