Skip to content

Instantly share code, notes, and snippets.

@slim-python
Created July 31, 2020 18:00
Show Gist options
  • Save slim-python/98e0119009b4f2278272c2217201d107 to your computer and use it in GitHub Desktop.
Save slim-python/98e0119009b4f2278272c2217201d107 to your computer and use it in GitHub Desktop.
Difference between var, let and const keyword in Javascript
if (1 != 2) {
let age = 35;
console.log(age);
//output: 35
}
console.log(age);
//output: ReferenceError: age is not defined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment