textbox.value = guess;
guessWord();
if (document.querySelector(".correct")) {
console.log("Found the word:", guess);
break;
} else if (textbox.placeholder.includes("after")) {
l = m + 1;
} else {
h = m - 1;
}
}
Here's mine in JavaScript, you can paste it in the console.
const textbox = document.querySelector("input");
while (l <= h) { const m = Math.floor((l + h) / 2); const guess = dictionary[m]; const textbox = document.querySelector("input"); console.log("Guessing:", guess);
}Here's mine in JavaScript, you can paste it in the console.