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.

3m read time From valentinog.com
Post cover image
Table of contents
varlet
1 Comment

Sort: