1. Primitive Data Types
Represents numeric values, including integers and floating-point numbers. For example:
Represents sequences of characters, enclosed in single (”) or double (“”) quotes. For example:
Represents a binary value, either `true` or `false`. It is often used for making conditional decisions. For example:
Represents the intentional absence of any value or object. For example:
Represents a variable that has been declared but has not been assigned a value. For example:
f. Symbol (ES6):
Represents a unique and immutable value used as object property keys. Symbols are often used for creating private object properties.
2. Reference Data Types
Reference data types, also known as objects, are more complex data structures that can hold multiple values and are mutable, meaning their content can be modified. Common reference data types include:
Represents a collection of key-value pairs, where keys are strings (or Symbols), and values can be of any data type. For example:
Represents an ordered list of values, accessible by their index. Arrays can hold values of different data types. For example:
Represents a reusable block of code that can be executed when called. Functions can also be assigned to variables. For example:
Limited seats available! Visit JeeviAcademy or call +91 9994051212 to enroll. Start your journey towards a successful career in UI & UX design now!