I am attempting to create a loop that asks the user for a number until they input an actual number, triggering an alert box each time.
Despite using a while loop and `isNaN`, my current implementation seems to be flawed.
This is the JavaScript code I have so far:
var correct = false;
do {
var question = prompt("Guess the number?");
if (question !== isNaN) {
document.write("Your number is " + question);
correct = true;
break;
}
} while (!correct);