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

@@ -35,4 +35,9 @@ function increaseScore() {
document.querySelector('.correct').addEventListener("click", () => { 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();
}); });