added a click event for the 'wrong' button to replace the displayed word

This commit is contained in:
2025-08-28 11:30:22 -04:00
parent e3c377d547
commit 80a98ac094

View File

@@ -36,3 +36,8 @@ document.querySelector('.correct').addEventListener("click", () => {
increaseScore(); increaseScore();
replaceWord(); replaceWord();
}); });
// click event for the red wrong button, replaces the word displayed with a new one
document.querySelector('.wrong').addEventListener("click", () => {
replaceWord();
});