Skip to content Skip to sidebar Skip to footer

How To Deal With Repeated Letters In A Javascript Hangman Game

I am a beginner to html, css and javascript, and I am creating this hangman game using these, which works fine for words with single instances of each letter but it seems to run in

Solution 1:

You can try to remove your letter with jquery

Otherwise you could just add inside your function this piece of code:

clickedLetter.style.display = "none";

Update: wait, I thought you were asking how to hide the clicked letters after being clicked... As for showing the letters your piece of code should do just that. And don't worry the letters will "appear" at the same time.

Post a Comment for "How To Deal With Repeated Letters In A Javascript Hangman Game"