Basics
Challenges
Classes
Debugging
Events
External Files
Flow Control
Forms
Functions
Html Elements
Installation
Interfaces
Keywords
Modules
Namespaces
Operators
Reference Files
String
Types
let
and const
are two relatively new types of variable declarations in JavaScript.
let
is similar to var
in some respects, but allows users to avoid some of the
common "gotchas" that users run into in JavaScript. const
is an augmentation of let in
that it prevents re-assignment to a variable.
let
prevents variables from being used before their declaration.
var = bad
let = good
let = good
https://www.typescriptlang.org/docs/handbook/variable-declarations.html