Create Javascript Word Reverser

The code for the program itself.