filmov
tv
Datatypes in JavaScript

Показать описание
Primitives/Value Types::--
These data types are pretty simple, and are sometimes treated as the lowest level of implementation of a programming language. They are not objects, and do not have methods.
Number- Used for Decimals and Integer
String- sequence of chars and used for Text
Boolean - Logical type (true,false) used for taking decisions
Undefined- Value taken by a variable that is not yet defined (‘empty value’)
Null- also means ‘empty value’
Symbol (ES2015)- Value that is unique and cannot be changed [Not useful for now]
BigInt (ES2020)- Larger integers than the Number type can hold
Reference Type::--
Reference data types, unlike primitive data types, are dynamic in nature. That is, they do not have a fixed size.
Functions
Objects
Arrays
Dates
These data types are pretty simple, and are sometimes treated as the lowest level of implementation of a programming language. They are not objects, and do not have methods.
Number- Used for Decimals and Integer
String- sequence of chars and used for Text
Boolean - Logical type (true,false) used for taking decisions
Undefined- Value taken by a variable that is not yet defined (‘empty value’)
Null- also means ‘empty value’
Symbol (ES2015)- Value that is unique and cannot be changed [Not useful for now]
BigInt (ES2020)- Larger integers than the Number type can hold
Reference Type::--
Reference data types, unlike primitive data types, are dynamic in nature. That is, they do not have a fixed size.
Functions
Objects
Arrays
Dates