Still waiting for the New York Times to send me a bogus takedown notice
Fix wrong argument being taken in checkAnswer()
Saksham Mittal 2022-04-03
parent dc11c74 · commit de1d72a
-rw-r--r--script.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/script.js b/script.js
index 48cc52a..0278159 100644
--- a/script.js
+++ b/script.js
@@ -46,7 +46,7 @@ function addGuessDisplay(answer, guess, len, hint) {
}
function validateInput(str, len) {
-
+
let isvalid = true;
for (var i = 0; i < len; i++) {
@@ -56,12 +56,12 @@ function validateInput(str, len) {
break;
}
}
-
+
return isvalid;
}
-function checkAnswer(event, answer, len, maxtries) {
+function checkAnswer(event, answer, len, wordlist) {
event.preventDefault();
@@ -83,7 +83,7 @@ function checkAnswer(event, answer, len, maxtries) {
if (tries > 1) {
attempt.innerHTML += "s";
}
- }
+ }
}
}