- Variables can be initialized with a value. If a variable doesn’t contain any value it remains undefined. If a variable becomes empty it holds a null value.
- Multiple variables can be declared in one statement by using var keyword and separating all of them with commas.
- Variable names can start only with an alphabet or underscore (_). The name should not have spaces but can have alphabets, digits and underscore.
- Variable names are case-sensitive and should not be a keyword.
- One variable can hold values of different data types within a script at different points of execution. For example variable age is assigned number value. After a few statements age variable can be assigned a string value.
Float or floating point numbers are used to express the numeric value in decimal form or exponent form (mantissa and exponent).