Hangman in Javascript