JavaScript based HangMan game