JavaScript - Prompt while input is not a number
<p>I want to ask the user for a number, while his answer is not a number the question will keep on looping (as an alert box).</p>

<p>I tried to do that with while loop and <code>isNaN</code>, but i'm doing something wrong.</p>

<p><strong>Here is my Js:</strong></p>

<pre><code>var correct = false;

do {
    var question = prompt("guess the number?");
    if (question !== isNaN) {
        document.write("your number is " + question);
        correct = true;
        break;
   }

} while(! correct);
</code></pre>