There are three ways to declare a JavaScript variable:
We'll discuss the differences in Scope, Redeclaration, and Hoisting.
The var statement declares a variable.
The let keyword was introduced in ES6 (2015).
The const keyword was introduced in ES6 (2015).