Variable Scope
- The
var
statement declares a function-scoped or globally-scoped variable, optionally initializing it to a value. - The
let
statement declares a block-scoped local variable, optionally initializing it to a value. - The
const
are block-scoped, much like variables declared using the let keyword. The value of a constant can't be changed through reassignment, and it can't be redeclared.