title: Let Scope output
body: <p>Can anyone explain why the first console in test function gives the value 99.</p>
  
  <pre><code>let l = 99;
  
  function test(){
      console.log(l);
      if(true){
          let l = 7;
          console.log(l);
      }
  }
  
  test();
  console.log(l);
  </code></pre>