-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathobject.js
More file actions
40 lines (27 loc) · 674 Bytes
/
Copy pathobject.js
File metadata and controls
40 lines (27 loc) · 674 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/* object */
//object is like a container of properties.
//example
/*
const obj={
name:"string", vale:33
};
*/
/* array VS object */
//array can access using index.
//object can access using string or symbol
//arrays are ordered
//objects are not ordered
//example(to access all the properties)
/*
const obj={
f1:"hello",
f2:"everyone",
f3:"welcome",
f4:"back to",
f5:"daily tution"
};
//using control flow statement
for (let f in obj){
console.log(obj[f]);
}
*/