From 80a98ac094d94c40735335c3ddf3f325ee8d3aaf Mon Sep 17 00:00:00 2001 From: Mike Rockwell Date: Thu, 28 Aug 2025 11:30:22 -0400 Subject: [PATCH] added a click event for the 'wrong' button to replace the displayed word --- wally/app.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wally/app.js b/wally/app.js index 28e9d38..008d5df 100644 --- a/wally/app.js +++ b/wally/app.js @@ -35,4 +35,9 @@ function increaseScore() { document.querySelector('.correct').addEventListener("click", () => { increaseScore(); replaceWord(); +}); + +// click event for the red wrong button, replaces the word displayed with a new one +document.querySelector('.wrong').addEventListener("click", () => { + replaceWord(); }); \ No newline at end of file