Modifying text in javascript

Changing text with javascript can produce interesting results.

In this experiment, I've tried to do some basic text operations, like counting words, removing spaces and changing the title case. There are also some more advanced operations, such as calculating the word usage and converting the text to pig latin.

Check it out.