File tree Expand file tree Collapse file tree 7 files changed +18
-11
lines changed
docs/1-trial-session/11-object
add-and-view-Japanese-score Expand file tree Collapse file tree 7 files changed +18
-11
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 1+ const tanaka = {
2+ name : "田中" ,
3+ scores : { math : 90 , science : 80 } ,
4+ } ;
5+ tanaka . scores . japanese = 50 ;
6+ document . write ( tanaka . scores . japanese ) ;
Load Diff This file was deleted.
File renamed without changes.
Original file line number Diff line number Diff line change 1+ const tanaka = {
2+ name : "田中" ,
3+ scores : { math : 90 , science : 80 } ,
4+ } ;
5+ document . write ( tanaka . scores . math ) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -57,23 +57,22 @@ document.write(person.age);
5757
5858``` javascript
5959person .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 = {
123122document .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の解答"
129128tanaka .scores .japanese = 50 ;
130129document .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
You can’t perform that action at this time.
0 commit comments