I have string as this is test for alternative. What I want to find is location of for. I know I could have done this using alert(myString.indexOf("for")), however I don't want to use indexOf.
Any idea/ suggestion for alternative?
jsfiddle
Again, I need this done by Javascript only. No jQuery.. sadly :(
indexOf." Why not? Without that information, the question is pretty strange.