1. Primitive Data Type
2. Non-primitive Data Type/ Reference Data Type
There are 7 Primitive data types. They are : -
· Undefined: When you declare variable but don’t store value any value. This used for unintentionally missing values.
· null : This have no existence but not it’s not undefined .It’s used for intentionally missing values.
· number: It’s used for math calculation. It can be normal number, decimal numbers or even negative numbers.
· string : used for text .
· Boolean: It’s used for logical operator . It’s values are true and false.
· Symbols: used to hide implementation details.
· Bigint: used for big numbers for math.
Non Primitive Data Types: Non primitive data types don’t store values directly. They store values as references. These types of values are objects. Here are different types of data types –
· Object: used to group related data.
· Array: used for collect a group of data.
· Function: used to refer to code.
Expressions: An expression is a snippet of code that can be evaluate to a value. The value may be a number, a string, or a logical value.
· Arithmetic expression: It’s evaluates to a number.
· String expression: It’s evaluates to character string.
· Logical expression: It’s evaluates to true or false.