title: JsLint 'out of scope' error
body: <pre><code>function test(){
      if(true){
          var a = 5;
      }
      alert(a);
  }
  
  test();
  </code></pre>
  
  <p>I keep getting 'out of scope' errors in my JS code when I check with JsLint which make no sense to me.So I quickly created an example. Is there something actually wrong with this code piece, as the variable is eventually hoisted to the top of the function anyways.</p>