From de1d72a62eca38faf2a67e6ee78c3bdad5c8f00c Mon Sep 17 00:00:00 2001 From: Saksham Mittal Date: Sun, 3 Apr 2022 18:33:06 +0530 Subject: Fix wrong argument being taken in checkAnswer() --- script.js | 8 ++++---- 1 file 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"; } - } + } } } -- cgit 1.4.1