topical media & game development
var myString = "Welcome to Wrox books. ";
myString = myString + "The Wrox website is www.wrox.com. ";
myString = myString + "Visit the Wrox website today. Thanks for buying Wrox";
var foundAtPosition = 0;
var wroxCount = 0;
while ( foundAtPosition != -1)
foundAtPosition = myString.indexOf("Wrox",foundAtPosition);
if (foundAtPosition != -1)
document.write("There are " + wroxCount + " occurrences of the word Wrox");
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.