var myWord = new String("John Doe, John Smith");var myIndex = myWord.lastIndexOf("John");// "myIndex" will contain 10 as the index position