Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor changes #55

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions 01_05/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ const markup = (backpack) => {
<li>Volume: ${backpack.volume}</li>
<li>Color: ${backpack.color}</li>
<li>Number of pockets: ${backpack.pocketNum}</li>
<li>Strap lengths: L: ${backpack.strapLength.left}, R: ${
backpack.strapLength.right
} </li>
<li>Strap lengths: L: ${backpack.strapLength.left}, R: ${backpack.strapLength.right} </li>
<li>Top lid: ${backpack.lidOpen ? "Open" : "Closed"}</li>
</ul>
</div>
Expand Down
21 changes: 21 additions & 0 deletions 03_06/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,25 @@ const backpack = {
},
};


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);
2 changes: 1 addition & 1 deletion 03_10/Backpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ class Backpack {
}
}

export default Backpack;
export default Backpack;
12 changes: 2 additions & 10 deletions 03_13/Backpack.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
class Backpack {
constructor(
name,
volume,
color,
pocketNum,
strapLengthL,
strapLengthR,
lidOpen,
dateAcquired
) {
constructor(name, volume, color, pocketNum, strapLengthL, strapLengthR, lidOpen, dateAcquired) {
this.name = name;
this.volume = volume;
this.color = color;
Expand Down Expand Up @@ -37,3 +28,4 @@ class Backpack {
}

export default Backpack;

16 changes: 16 additions & 0 deletions 03_13/Desk.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
class Desk {
constructor(width, height, length, legsLength, tableArea, monitorOpen) {
this.width = width;
this.height = height;
this.length = length;
this.legsLength = legsLength;
this.tableArea = tableArea;
this.monitorOpen = monitorOpen;
}

monitorChangeStatus(monitorStatus){
this.monitorOpen = monitorStatus;
}
}

export default Desk;
1 change: 1 addition & 0 deletions 03_13/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Classes</title>
<script type="module" src="Backpack.js"></script>
<script type="module" src="Desk.js"></script>
<script type="module" src="script.js"></script>
</head>
<body></body>
Expand Down
Loading