🌍 Dev.to
`var`, `let`, and `const` in JavaScript
What is a Variable?
A variable is a named container used to store data in a program. The stored value can be a number, string, object, array, or any other data type.
Example:
let name = " John " ;
let age = 25 ;
1. var
var is the oldest way to declare variables in JavaScript. It was used before the introduction of ES6 (ECMAScript 2015).
Syntax
var city = " Chennai " ;
Characteristi...