Changes

Jump to: navigation, search

JavaScript String Object

110 bytes added, 19:16, 27 April 2007
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>

Navigation menu