title: Scoping rule - let keyword - TypeScript/JavaScript
body: <p>In the below sample code,</p>
  
  <pre><code>let a: number = 1; // Global(G)
  function f(){
      // let a: number = 1; // Enclosing(E)
      return function g(){
          // let a: number = 1;  // Local(L)
          return a;
      }
  }
  
  console.log(f()());
  </code></pre>
  
  <hr>
  
  <p>Does <code>let</code> keyword follow LEGB rule for variable lookup, similar to python?</p>