The oldest way of defining a variable in JavaScript is with the var keyword. Declaring with var does not place any restrictions on the value of the variable; it can be changed.
The use of var is still supported but considered legacy and was deprecated in ES6. However, with decades of existing programs and examples, it's important to at least be familiar with var.