filmov
tv
JavaScript Tutorial - #4 Differences between Var, Let and Const

Показать описание
Let and Const keywords was introduced in EcmaScript 6 and there are some important difference when we use let and const keywords instead var keyword.
- All variables defined with let and const keywords cannot be redeclared
- Also variables defined with let keyword must be declared before use.
- Variables defined with const cannot be Reassigned.
- Variables created with let have block scope
- All variables defined with let and const keywords cannot be redeclared
- Also variables defined with let keyword must be declared before use.
- Variables defined with const cannot be Reassigned.
- Variables created with let have block scope