1.

How to find the index of a particular string?(a) position()(b) index()(c) indexOf()(d) positionof()This question was posed to me in unit test.My doubt stems from Validation in division Caching, Debugging and Animation of JavaScript

Answer»

The correct OPTION is (c) indexOf()

The explanation: The indexOf() FUNCTION can be used to find out the INDEX of a particular character or a string. This method return an INTEGER telling the address of the particular character.



Discussion

No Comment Found

Related InterviewSolutions