forked from CodeYourFuture/HTML-CSS-Coursework-Week3
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpractice.js
More file actions
79 lines (66 loc) · 1.54 KB
/
practice.js
File metadata and controls
79 lines (66 loc) · 1.54 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//
// let kitten = {
// furColour: "orange",
// age: "23",
// };
// let laptop ={
// brand: "Lenovo",
// ram: "5GB",
// };
// let phone = {
// operatingSystem: "iOS",
// hasStylus: true,
// megapixels: 12,
// "batteryLife": "24 hours",
// }
// console.log(phone.hasStylus);
// let laptop = {
// brand: "Lenovo",
// screenSize: 13,
// isTouchscreen: true,
// };
// console.log(laptop.brand);
// let kitten = {
// ageMonths: 3,
// isFemale: true,
// furColour: "brown",
// };
// console.log(kitten.ageMonths);
// console.log(kitten.isFemale);
// console.log(kitten.furColour);
// let phone = {
// brand:'iPhone',
// model: 'iPhone X',
// launchYear: 2017,
// isUnlocked: true,
// };
// let phoneBrand = phone.brand;
// let phoneLaunchYear = phone["launchYear"];
// console.log(phoneBrand);
// console.log(phoneLaunchYear);
// WRITE CODE BELOW THIS
// let cow = {
// name: "Rex",
// eatGrass: "true",
// };
// // WRITE CODE ABOVE THIS
// console.log(cow.name);
// console.log(cow.eatGrass);
// let house = {
// address: "1 Kinning Park",
// previousOwners: ["Claire M.", "John A."],
// currentOwner: {
// firstName: "Margaret",
// lastName: "Conway",
// },
// };
let house = {
address: '51 Berkley Road',
previousOwners: ["Brian M.", "Fiona S."],
currentOwner: {
firstName: "Montgomery",
}
}
console.log(house.address);
console.log(house.previousOwners);
console.log(house.currentOwner.firstName);