Рет қаралды 6,276
The original variable declaration in JavaScript was "var". This gave us local and global scope.
In ES6, we gained the ability to create block scoped variables as well as constants. "let" gives us a replacement for variable declaration which is block scoped. "const" lets us create constants, which are variables that cannot be reassigned with new values.