Primitive Data Types
- String: Used for representing textual data. It is enclosed in single or double quotes.
- Number: Used for representing numeric values, including integers and floating-point numbers.
- Boolean: Represents a logical value, either true or false.
- Null: Represents the intentional absence of any object value.
- Undefined: Denotes a variable that has been declared but hasn’t been assigned a value yet.
Complex Data Types
- Object: A collection of key-value pairs, allowing you to store various properties and methods.
- Array: An ordered list of values, typically used for storing multiple items under a single variable name.
- Function: A callable object that performs a specific task when invoked.
- RegExp: Used for pattern matching with strings, providing powerful search and replace functionality.