File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
docs/1-trial-session/11-object Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ function incrementAge(person) {
33 return person ;
44}
55
6- const tanaka = { name : "田中" , age : 18 } ,
7- sato = { name : "佐藤" , age : 22 } ;
6+ const tanaka = { name : "田中" , age : 18 } ;
7+ const sato = { name : "佐藤" , age : 22 } ;
88const nextYearTanaka = incrementAge ( tanaka ) ;
99const nextYearSato = incrementAge ( sato ) ;
1010document . write (
Original file line number Diff line number Diff line change @@ -142,10 +142,10 @@ function incrementAge(person) {
142142 // ここに書く
143143}
144144
145- const tanaka = { name: " 田中" , age: 18 },
146- sato = { name: " 佐藤" , age: 22 };
145+ const tanaka = { name: " 田中" , age: 18 };
146+ const sato = { name: " 佐藤" , age: 22 };
147147const nextYearTanaka = incrementAge (tanaka);
148- const nextYearSato = incrementAge (sato); // 同じ関数を tanaka と sato に使い回せる
148+ const nextYearSato = incrementAge (sato);
149149// 19 歳、23 歳 と表示されてほしい
150150document .write (
151151 ` 田中は ${ nextYearTanaka .age } 歳、佐藤は ${ nextYearSato .age } 歳` ,
@@ -160,8 +160,8 @@ function incrementAge(person) {
160160 return person;
161161}
162162
163- const tanaka = { name: " 田中" , age: 18 },
164- sato = { name: " 佐藤" , age: 22 };
163+ const tanaka = { name: " 田中" , age: 18 };
164+ const sato = { name: " 佐藤" , age: 22 };
165165const nextYearTanaka = incrementAge (tanaka);
166166const nextYearSato = incrementAge (sato);
167167document .write (
You can’t perform that action at this time.
0 commit comments