title: Why is using let resulting in undefined in a block of code?
body: <p>When running code in a code block it results in 'undefined' then using the 'this' to reference a local variable in a block of code.  </p>
  
  <p>The strange thing is when removing the 'this' keyword in the same block, it prints fine.</p>
  
  <pre class="lang-js prettyprint-override"><code>let productId = 12;
  
  if (true) {
      let productId = 10
      console.log(this.productId) // results in 'undefined'
      console.log(this) //results in '{}'
      console.log(productId) // results in '10'
  }
  </code></pre>
  
  <p>Was under the impression that the 'this.productId' would refer directly to the productId in the true code block.</p>