34,333
edits
Changes
→Manipulating Strings with the String Object
myString = new String ("This is my string");
var location = myString.indexOf ("my"); // returns 8 which is the index position where 'my' begins
location = myString.indexOf ("hello"); // returns -1 because myString does not contain the word "hello"
</pre>