title: What does "var" do in JavaScript? Why is it sometimes part of an assignment?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1470488/difference-between-using-var-and-not-using-var-in-javascript">Difference between using var and not using var in JavaScript</a>  </p>
  </blockquote>
  
  
  
  <pre><code>var foo = 1;
  
  foo = 1;
  </code></pre>
  
  <p>What is the difference between above two lines ?</p>