title: how is closure working with let in js?
body: <p>I am learning about the new features in <strong>ES6</strong>. I have a question about how <strong>let</strong> is really behaves, let's check the following example:</p>
  
  <pre><code>function aHero() {
    return 'Boy'
  }
  
  function aFoil() {
    return 'Rat'
  }
  
  function aDeed() {
    return 'Deed'
  }
  
  let sagas = [];
  let hero = aHero();
  let newSaga = function () {
    let foil = aFoil();
    sagas.push(function () {
      let deed = aDeed();
      console.log(hero + deed + foil)
    });
  }
  
  newSaga();
  sagas[0]();
  sagas[0]();
  newSaga();
  </code></pre>
  
  <p>ES5: <code>var</code> scoped variable to entire function so when the code is running in browser, all variables been hoisted,  on the other side in <strong>ES6</strong> <code>let</code> scoped variable to its block so when run this code <code>saga[0]()</code> will print three words 'BoyDeedRat'  </p>
  
  <p>so I'm wondering how closure is really working with let ??</p>