Overview

The computer picks a number between 1 and 100, and you have to guess it.
The computer will tell you whether your guess was too high, too low, or correct.
Your assignment is to generate a random number and let the user guess numbers until they guess the correct number.

Hints
You’re going to want to use some kind of loop. Make sure to exit the loop when the user guesses correctly or hits cancel.
Use constants, MIN and MAX to represent the range of numbers the computer can choose.
You will need to use the Randomizer to generate a number. See the cheat sheet.

Final Product
Here is a screenshot of a sample run of the guessing game.

Guess? 53
High
Guess? 20
Low.
Guess? 40
High
Guess? 35
High
Guess? 31
Low.
Guess? 33
Correct!

const MIN = 1;

const MAX = 100;

let randomNumber = Math.floor(Math.random() * (MAX - MIN + 1)) + MIN;
let guess;

while (guess !== randomNumber && guess !== null) {
guess = prompt("Guess?");
if (guess < randomNumber) {
alert("Low.");
} else if (guess > randomNumber) {
alert("High");
}
}

if (guess === randomNumber) {
alert("Correct!");
}