Primitive Data Types
-
String – Represents text.
"Hello" -
Number – Represents numbers.
25,10.5 -
BigInt – Represents very large integers.
123456789n -
Boolean – Represents
trueorfalse. - Undefined – A variable with no assigned value.
- Null – Represents an intentional empty value.
- Symbol – Represents a unique identifier.
Non-Primitive Data Types
-
Object – Stores data in key-value pairs.
{name: "John"} -
Array – Stores multiple values.
[10, 20, 30] -
Function – A reusable block of code.
function greet() {}
Top comments (0)