Skip to content

Commit 6e89649

Browse files
committed
chvmvdのレビュー反映
1 parent 290b7aa commit 6e89649

File tree

7 files changed

+18
-11
lines changed

7 files changed

+18
-11
lines changed

docs/1-trial-session/11-object/_samples/editAndViewJapaneseScore/index.html renamed to docs/1-trial-session/11-object/_samples/add-and-view-Japanese-score/index.html

File renamed without changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const tanaka = {
2+
name: "田中",
3+
scores: { math: 90, science: 80 },
4+
};
5+
tanaka.scores.japanese = 50;
6+
document.write(tanaka.scores.japanese);

docs/1-trial-session/11-object/_samples/editAndViewJapaneseScore/script.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/1-trial-session/11-object/_samples/viewMathScore/index.html renamed to docs/1-trial-session/11-object/_samples/view-math-score/index.html

File renamed without changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const tanaka = {
2+
name: "田中",
3+
scores: { math: 90, science: 80 },
4+
};
5+
document.write(tanaka.scores.math);

docs/1-trial-session/11-object/_samples/viewMathScore/script.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/1-trial-session/11-object/index.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,23 +57,22 @@ document.write(person.age);
5757

5858
```javascript
5959
person.favoriteFood = "餃子";
60-
document.write(person.favoriteFood);
61-
// 餃子
60+
document.write(person.favoriteFood); // 餃子
6261
```
6362

6463
:::
6564

66-
:::note <Term type="javascriptObject">オブジェクト</Term>と「プリミティブ」
65+
:::note <Term type="javascriptObject">オブジェクト</Term>とプリミティブ
6766

6867
この章よりも前に扱ってきたような「それ以上分解できない」<Term type="javascriptValue">値</Term>のことを<Term strong type="javascriptPrimitive">プリミティブ</Term>といい、<Term type="javascriptPrimitive">プリミティブ</Term>でない値はすべて<Term type="javascriptObject">オブジェクト</Term>です。
6968

70-
![値の種類・オブジェクト付き](./value-types-with-object.drawio.svg)
69+
![値の種類](./value-types-with-object.drawio.svg)
7170

7271
:::
7372

7473
## 配列とオブジェクト
7574

76-
上で説明したように、配列はプリミティブではないのでオブジェクトの一種です。JavaScript のオブジェクトとは、プロパティ名とプロパティ値の組み合わせでした
75+
上で説明したように、配列はプリミティブではないのでオブジェクトの一種です。JavaScript のオブジェクトとは、プロパティ名とプロパティ値の組の集合でした
7776

7877
配列もこの原則に従って動作しています。次の図に示すように、配列とは、各要素のインデックスがプロパティ名になっているオブジェクトだと考えることができるのです。
7978

@@ -123,16 +122,16 @@ const tanaka = {
123122
document.write(tanaka.scores.math);
124123
```
125124

126-
<ViewSource url={import.meta.url} path="_samples/viewMathScore" />
125+
<ViewSource url={import.meta.url} path="_samples/view-math-score" />
127126

128127
```javascript title="2の解答"
129128
tanaka.scores.japanese = 50;
130129
document.write(tanaka.scores.japanese);
131130
```
132131

133-
<ViewSource url={import.meta.url} path="_samples/editAndViewJapaneseScore" />
132+
<ViewSource url={import.meta.url} path="_samples/add-and-view-Japanese-score" />
134133

135-
2はプロパティの追加を利用しています
134+
2では、プロパティを自分で追加しています
136135

137136
</Answer>
138137

0 commit comments

Comments
 (0)