Now that we have a basic idea about the variable , we need to understand more about what goes inside those variable which are the different DataTypes.
Everything that we work inside of an application ultimately comes down to Primitive DataTypes.
Primitive data types include undefined, string, number and boolean
Undefined variables haven't been assigned values yet.If we put nothing inside a variable it is type of UnDefined.
- A string is a series of characters and is surrounded by quotes
var myStringWelcome = "Hello World";
- A number can be either an integer or a decimal
var myNumberInt = 100; var myNumberDecimal = 100.100;
- Booleans have two values: true or false
var isMyBooleanTrue = true; var isMyBooleanFalse = false;