Skip to content

Instantly share code, notes, and snippets.

@CodHeK
Created August 16, 2018 10:41
Show Gist options
  • Save CodHeK/bebdc076c762c104422742cbd502f6d9 to your computer and use it in GitHub Desktop.
Save CodHeK/bebdc076c762c104422742cbd502f6d9 to your computer and use it in GitHub Desktop.
diff let, var
if(true) {
v = 9;
}
var v;
console.log(v) //prints 9
if(true) {
v = 9;
}
let v;
console.log(v) //error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment