I am working on a simple code, without getting into full detail, I'll jump straight to brass tacks.
Here is the simple code snippet that has a do-while construct repeat until the input is not a NaN.
do {
var choice = parseInt(prompt("Please select one of the following:\n1.ROCK\n2.PAPER\n3.SCISSORS\n[NOTE: Choose your selection by pressing a number between 1,2 or 3.]"));
} while (isNaN(choice));
This code essentially prompts the user until a user's input meets while loop exit criteria. The code works fine if I execute in a chrome snippet. Although, the same code on jsbin does not prompt even if I enter a string input. I am curious whether is it something with the code or the website?
Below is screenshot proof for the same:
Chrome Snippet