Canvas based simple JavaScript hangman game