-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathobj.js
More file actions
37 lines (34 loc) · 818 Bytes
/
obj.js
File metadata and controls
37 lines (34 loc) · 818 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
const person = {
name: 'Shuvo',
isStudent: true,
profession: "Web Developer",
position: "Junior",
salary: 15000,
address: [
{
homeTown: {
village: "Munshigonj",
postOffice: "Lohjong",
thana: "Lohjong"
}
},
{
permanent_address: {
village: "Munshigonj",
postOffice: "Lohjong",
thana: "Lohjong"
},
},
{
present_address: {
village: "Genda",
postOffice: "Savar",
thana: "Savar"
}
}
]
}
const name = person.name;
console.log(name);
const homeTownAddress = person.address[0].homeTown.village;
console.log(homeTownAddress);