Creating variables in often referred to as “declaring” variables. var statement used to declare variables.
Interesting part is, you don’t need to declare a variable to use it. Just start using it like
After some time, you realize your mistake and redeclare it like
You may expect, now the value of age is 0 ….
But still the age is 25 !!!
age = 25;
alert(age); // 25
Great POWER comes with great RESPONSIBILITY.