Created
July 31, 2020 18:00
-
-
Save slim-python/98e0119009b4f2278272c2217201d107 to your computer and use it in GitHub Desktop.
Difference between var, let and const keyword in Javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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