-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathproblem53.js
53 lines (45 loc) · 1.14 KB
/
problem53.js
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
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
### Challenging
Console the value of email
Console the value of address
Console the value of city
Console the value of lat
Console the value of company name
*/
const user = {
id: 1,
name: "Leanne Graham",
username: "Bret",
email: "Sincere@april.biz",
address: {
street: "Kulas Light",
suite: "Apt. 556",
city: "Gwenborough",
zipcode: "92998-3874",
geo: {
lat: "-37.3159",
lng: "81.1496",
},
},
phone: "1-770-736-8031 x56442",
website: "hildegard.org",
company: {
name: "Romaguera-Crona",
catchPhrase: "Multi-layered client-server neural-net",
bs: "harness real-time e-markets",
},
};
const emailOfUser = user.email;
const userAddres = user.address;
const userCity = user.address.city;
const userGeoLat = user['address']['geo']['lat'];
const userCompany = user.company['name'];
console.log(userAddres);
const totalOutput = `
1. User email is ${emailOfUser}
2. User address is ${userAddres}
3. User city is ${userCity}
4. User lat is ${userGeoLat}
5. User company is ${userCompany}
`;
console.log(totalOutput);