What is a variable?
Variables are used to store values.
i.e. for example if we have to add two numbers, we will declare two variables and assign the numbers to each variable and add them to get the result.
var a = 5;
var b= 5;
var c = a+b;
a) Number (Integer and Float)
var a = "as"; --> This is a string type variable
var a = 2; --> This is a integer type variable
var a = true; --> This is a boolean type variable
Here var defines it as a variable.
"a" is the variable name.
"as", 2, true are called values.
The variable name can have alphanumeric values. Any lowercase (a-z) or uppercase (A-Z) alphabets, numbers (0-9) or underscore(_).