title: Javascript if statements not working
body: <p>Pretty straight-forward what I want to do:</p>
  
  <ul>
  <li>If the input is <code>0</code>, it means that they didn't input a number and it
  should tell you so.</li>
  <li>When the input is <code>7</code>, it should say that you got it right.</li>
  <li>Anything else, it should tell you that you got it wrong.</li>
  </ul>
  
  <p>But it just outputs the "7 is correct" line no matter what the input is, and I can't figure it out what is wrong.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function problem2 ()
  {
  var number = 0;
  var text=document.getElementById("output");
  number = prompt("Enter a number between 1 and 10 please" , 0);
  if (number = 0)
      {
       text.value = "You didn't enter a number!";
      }
  if (number = 7)
      {
       text.value = "7 is correct!";
      }
  else
      {
       text.value = "Sorry, ", input, "is not correct!";
      }
  }
  &lt;/script&gt;
  &lt;input type="button" value="Click here" onclick="problem2()"&gt;
  &lt;input id="output" type="text"&gt;
  </code></pre>