Defining Javascript Variables: Why You Should Ditch Var for Let and Const
Too Long; Didn't Read
The use of `let` and `const` to define variables is well-known and recommended over the use of var. This article will elaborate on the reasons for avoiding `var` and provide guidance on converting old code from the internet to `let/const. `let' and 'const' are block-scoped, limiting their accessibility to the closest enclosing block.