Hangman game written in JS