Reverse a word in javascript.