Skip to content

Instantly share code, notes, and snippets.

@alexnm
Created January 10, 2016 16:08
Show Gist options
  • Save alexnm/76e0f10b8337b341619b to your computer and use it in GitHub Desktop.
Save alexnm/76e0f10b8337b341619b to your computer and use it in GitHub Desktop.
if ( condition ) {
let x = 1;
const y = 2;
var z = 3;
x = 4;
y = 5;
z = 6;
console.log( x ); // 4
console.log( y ); // 2
console.log( z ); // 6
}
console.log( x ); // x is undeclared
console.log( y ); // y is undeclared
console.log( z ); // 6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment