DataTypes and Scope In [JavaScript ]
JavaScript is the most popular language In the world and it runs on the most popular environment means web(browser); By using JavaScript you can create complete web and desktop application.
[DataTypes in Javascript:]
In JavaScript, there are 3 types of primitive data-types.
-
Number
-
String
-
Boolean
-
Number : in this, you can assign values like 10,10.2 means even if you assign a floating-point number to a variable it is treated like a number data-types.
-
String : in this, you can assign a single character or multiple characters it is treated as string datatype.
-
Boolean : You can assign true and false value in this.
-
Undefined : in this, you declared a variable but you don’t assign the value to it is undefined.
-
Null : if a variable can not contain value other than null it is null.