Hangman game written in JavaScript