guessSubmit.addeventListener("click", checkGuess);What went wrong? Troubleshooting JavaScript / notebook
What went wrong? Troubleshooting JavaScript
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
lowOrHi.textContent = "Last guess was too high!"; const lowOrHi = document.querySelector("lowOrHi"); console.log(lowOrHi); <p class="lowOrHi"></p> let randomNumber = Math.floor(Math.random()) + 1; randomNumber = Math.floor(Math.random()) + 1; console.log(randomNumber);Math.random();Math.floor(Math.random()) + 1;Math.floor(Math.random() * 100);Math.floor(Math.random() * 100) + 1;} else if (guessCount === 10) {} else if (guessCount = 10) {function checkGuess() {function checkGuess( {