title: javascript global variable with 'var' and without 'var'
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>
  
  
  
  <p>I understand that I should always use 'var' to define a local variable in a function.</p>
  
  <p>When I define a global function, what's the difference between using 'var' ?</p>
  
  <p>Some of code examples I see over the internet use</p>
  
  <pre><code>var globalVar = something;
  globalVar = something;
  </code></pre>
  
  <p>What's the difference?</p>