dsa | sp javascript string | Question 3

Last Updated :
Discuss
Comments

Which method is used to find the index of the first occurrence of a specific character or substring in a string?

a. indexOf()

b. findIndex()

c. search()

d. locate()

Share your thoughts in the comments