-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
392 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
docs/1-trial-session/11-object/_samples/add-and-view-Japanese-score/script.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
docs/1-trial-session/11-object/_samples/average-score/script.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const student = { | ||
name: "山田太郎", | ||
age: 15, | ||
email: "[email protected]", | ||
scores: { | ||
japanese: 90, | ||
math: 70, | ||
english: 80, | ||
}, | ||
}; | ||
|
||
const averageScore = | ||
(student.scores.japanese + student.scores.math + student.scores.english) / 3; | ||
document.write(`平均点は${averageScore}点です。`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
docs/1-trial-session/11-object/_samples/change-location-property/script.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const book = { | ||
title: "吾輩は猫である", | ||
author: "夏目漱石", | ||
price: 600, | ||
availability: { | ||
isAvailable: true, | ||
location: "2階 E列", | ||
}, | ||
}; | ||
|
||
document.write(`本は${book.availability.location}にあります。`); // 本は2階 E列にあります。 | ||
book.availability.location = "1階 A列"; | ||
document.write(`本は${book.availability.location}にあります。`); // 本は1階 A列にあります。 |
10 changes: 10 additions & 0 deletions
10
docs/1-trial-session/11-object/_samples/change-price-property/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!doctype html> | ||
<html lang="ja"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>図書館</title> | ||
</head> | ||
<body> | ||
<script src="./script.js"></script> | ||
</body> | ||
</html> |
9 changes: 9 additions & 0 deletions
9
docs/1-trial-session/11-object/_samples/change-price-property/script.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const book = { | ||
title: "吾輩は猫である", | ||
author: "夏目漱石", | ||
price: 600, | ||
}; | ||
|
||
document.write(book.price); | ||
book.price = 700; | ||
document.write(book.price); |
10 changes: 10 additions & 0 deletions
10
docs/1-trial-session/11-object/_samples/create-book-object/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!doctype html> | ||
<html lang="ja"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>図書館</title> | ||
</head> | ||
<body> | ||
<script src="./script.js"></script> | ||
</body> | ||
</html> |
5 changes: 5 additions & 0 deletions
5
docs/1-trial-session/11-object/_samples/create-book-object/script.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const book = { | ||
title: "吾輩は猫である", | ||
author: "夏目漱石", | ||
price: 600, | ||
}; |
5 changes: 0 additions & 5 deletions
5
docs/1-trial-session/11-object/_samples/view-math-score/script.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.