Javascript window prompt
<pre><code>var target=10;
var totalGuess=0;
var input = window.prompt('Enter a number between 1 and 100: ');  
var guess = parseInt(input);  
  do  
    {  
        totalGuess++;  
        if (guess &lt; target)  
        {  
            window.prompt("Too low! Guess Again!");  
        }  
        if (guess &gt; target)  
        {  
            window.prompt("Too High! Guess Again!");  
        }  
        if (guess == target)  
        {  
            alert("Thats right! It took you " +totalGuess +" tries to get it right!"); 
            break;
        }  

    } while (guess != target );  
</code></pre>

<p>I am trying to check for if the number the user enter is high or low but this program is only check for one statements and then stops.</p>
