Javascript tutorial, please explain
<p>I'm a newbie learning Javascript. In the following tutorial, I don`t understand </p>

<ul>
<li><p>why value is initially set to null</p></li>
<li><p>if the value entered is 2, for example, how does the program know to display "You`re an embarassment" and not redisplay the initial question "What is the value of 2 + 2"?</p></li>
</ul>

<p>The question/prompt is triggered when value != 4 so I would expect an answer of 2 to retrigger to question/prompt, but instead the program displays the message "You`re an embarassment".</p>

<p>Can anyone explain?</p>

<pre><code>var value = null;
while (value != "4") {
  value = prompt("You! What is the value of 2 + 2?", "");
  if (value == "4")
    alert("You must be a genius or something.");
  else if (value == "3" || value == "5")
    alert("Almost!");
  else
    alert("You're an embarrassment.");
}
</code></pre>
