title: Do let statements create properties on the global object?
body: <p>In JavaScript, <code>var</code> declarations create properties on the global object:</p>
  
  <pre><code>var x = 15;
  console.log(window.x); // logs 15 in browser
  console.log(global.x); // logs 15 in Node.js
  </code></pre>
  
  <p>ES6 introduces lexical scoping with <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let" rel="noreferrer"><code>let</code></a> declarations that have block scope.</p>
  
  <pre><code>let x = 15;
  {
     let x = 14;
  }
  console.log(x); // logs 15;
  </code></pre>
  
  <p>However, do these declarations create properties on the global object?</p>
  
  <pre><code>let x = 15;
  // what is this supposed to log in the browser according to ES6?
  console.log(window.x); // 15 in Firefox
  console.log(global.x); // undefined in Node.js with flag
  </code></pre>