nazerke
5/17/2016 - 4:44 AM

"let"s don't hoist.

"let"s don't hoist.

function foo(bar){
    if(bar){
        console.log(baz); //ReferenceError. Temporal dead zone
        let baz = bar;
    }
  }
  
  foo("bar");