var, let, and const in JavaScript: a cheatsheet.
TLDRThe var statement declares a variable in JavaScript which abides to the following rules:. function-scoped or globally-scope Accidental global variables reassignable and redeclared. let Block scoped Temporal dead zone Reassignable, not redeclarable.
1 Comment
Sort: