title: Are variable types permanent in Statically Typed Languages?
body: <p>My understanding is that variable types are "checked" before run-time for statically typed languages.</p>
  
  <p>I take this to mean that a var of type int can't ever be type string? Does this mean variable type can't change (within the same scope) throughout the program (in a statically typed language)?</p>
  
  <p>Somebody mentioned "variable shadowing" but I'm pretty sure that only applies in different scopes.</p>
  
  <pre><code>var i = 'hi';
  function foo() {
      var i = 1;
  }
  </code></pre>
  
  <p>My understanding of var shadowing is that <code>i</code> in the global scope is a different variable than <code>i</code> in the <code>foo</code> function scope and therefore their types are permanent and unrelated (in a static language, which JS is not). Is that right?</p>