Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 690ea7b

Browse files
Added non-primitive data types
1 parent 1728887 commit 690ea7b

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

‎docs/data-types.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,36 @@ It represents a unique identifier.
6868
const PRIVATE_KEY = Symbol("private");
6969
````
7070

71+
### ✦ Non-Primitive Data Types:
72+
Non-primitive data types in JavaScript are complex data structures that can hold multiple values or properties. They are mutable and compared by reference.
73+
74+
The list of non-primitive data types are arrays and objects.
75+
76+
### ✦ Arrays:
77+
It is a ordered collections of elements.
78+
79+
*Syntax: `let array = [1, "hello", true];`*
80+
81+
```javascript
82+
let fruits = ["apple", "banana", "orange"];
83+
let numbers = [1, 2, 3, 4, 5];
84+
````
85+
86+
See More on this [Reference](./arrays.md)
87+
88+
### ✦ Objects:
89+
It is a collections of key-value pairs
90+
91+
```javascript
92+
let object = {
93+
name: "Alice",
94+
age: 30,
95+
isStudent: true
96+
};
97+
```
98+
99+
See More on this [Reference](./objects.md)
100+
71101
### ✦ Comparison:
72102
- Data type:
73103
- Primitive Data Types: It represent individual values and single piece of data.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /