-
Notifications
You must be signed in to change notification settings - Fork 4k
Expand file tree
/
Copy pathscript.js
More file actions
executable file
·45 lines (40 loc) · 814 Bytes
/
script.js
File metadata and controls
executable file
·45 lines (40 loc) · 814 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
41
42
43
44
45
/**
* Create a Backpack object.
*/
const backpack = {
name: "Everyday Backpack",
volume: 30,
color: "grey",
pocketNum: 15,
strapLength: {
left: 26,
right: 26,
},
lidOpen: false,
toggleLid: function (lidStatus) {
this.lidOpen = lidStatus;
},
newStrapLength: function (lengthLeft, lengthRight) {
this.strapLength.left = lengthLeft;
this.strapLength.right = lengthRight;
},
};
const desk = {
width: 120,
height: 40,
length: 50,
legs: 4,
legsLength: {
rightFront: 35,
rightBack: 35,
leftFront: 35,
leftBack:35
},
tableArea: 0.48,
monitorOpen: false,
monitorChangeStatus: function (monitorStatus){
this.monitorOpen = monitorStatus;
console.log("monitorOpen status changed");
}
}
console.log("The backpack object:", backpack);