As its name indicates, a data type represents a type of the data which you can process using your computer program. So JavaScript also has 6 Primitive data types other than objects.
Lets Go though each of them.
- Undefined
This represent the lack of existence.(Shouldn't set a variable to this). - Null
This also represent lack of existence. - Boolean
This represent a value that is true or false - Number
This is a floating point number. Normally programming languages have many types of number like int,long,double but JavaScript has only one - String
This represents a sequence of characters. single quotes ('') or double quotes ("") are used to specify strungs - Symbol
This type is used in ES6 which is the latest version of JavaScript
No comments:
Post a Comment