how to deal with repeated letters in a javascript hangman game

前端 未结 1 1161
栀梦
栀梦 2021-01-28 22:16

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

相关标签:
1条回答
  • 2021-01-28 22:34

    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.

    0 讨论(0)
提交回复
热议问题