JavaScript Hangman game, problem with event listener
When a button is clicked and it equals any letter of the answer word, the button should turn green (and show the letter), otherwise red. The problem seems to be something with the event listener buttonGrid.addEventListener(...); The function checkLetter() works…