From 48a0a27e4728952b612bae4a40e1aa817ef3b037 Mon Sep 17 00:00:00 2001 From: na-trium-144 <100704180+na-trium-144@users.noreply.github.com> Date: Sat, 4 Nov 2023 15:24:32 +0900 Subject: [PATCH 1/4] =?UTF-8?q?incrementAge=E3=81=AE=E8=AA=B2=E9=A1=8C?= =?UTF-8?q?=E3=81=AB=E4=BD=90=E8=97=A4=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../11-object/_samples/incrementAge/script.js | 5 +++-- docs/1-trial-session/11-object/index.md | 11 +++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/1-trial-session/11-object/_samples/incrementAge/script.js b/docs/1-trial-session/11-object/_samples/incrementAge/script.js index e2bb135fe..b88ad2103 100644 --- a/docs/1-trial-session/11-object/_samples/incrementAge/script.js +++ b/docs/1-trial-session/11-object/_samples/incrementAge/script.js @@ -3,6 +3,7 @@ function incrementAge(person) { return person; } -const tanaka = { name: "田中", age: 18 }; +const tanaka = { name: "田中", age: 18 }, sato = { name: "佐藤", age: 22 }; const nextYearTanaka = incrementAge(tanaka); -document.write(nextYearTanaka.age); +const nextYearSato = incrementAge(sato); +document.write(`田中は ${nextYearTanaka.age} 歳、佐藤は ${nextYearSato.age} 歳`); diff --git a/docs/1-trial-session/11-object/index.md b/docs/1-trial-session/11-object/index.md index a98429474..404fc104f 100644 --- a/docs/1-trial-session/11-object/index.md +++ b/docs/1-trial-session/11-object/index.md @@ -136,9 +136,11 @@ function incrementAge(person) { // ここに書く } -const tanaka = { name: "田中", age: 18 }; +const tanaka = { name: "田中", age: 18 }, sato = { name: "佐藤", age: 22 }; const nextYearTanaka = incrementAge(tanaka); -document.write(nextYearTanaka.age); // 19 と表示されてほしい +const nextYearSato = incrementAge(sato); // 同じ関数を tanaka と sato に使い回せる +// 19 歳、23 歳 と表示されてほしい +document.write(`田中は ${nextYearTanaka.age} 歳、佐藤は ${nextYearSato.age} 歳`); ``` @@ -149,9 +151,10 @@ function incrementAge(person) { return person; } -const tanaka = { name: "田中", age: 18 }; +const tanaka = { name: "田中", age: 18 }, sato = { name: "佐藤", age: 22 }; const nextYearTanaka = incrementAge(tanaka); -document.write(nextYearTanaka.age); +const nextYearSato = incrementAge(sato); +document.write(`田中は ${nextYearTanaka.age} 歳、佐藤は ${nextYearSato.age} 歳`); ``` From 80779f2461d6f0ac64e24c99b1ed519fd75e0ddf Mon Sep 17 00:00:00 2001 From: na-trium-144 <100704180+na-trium-144@users.noreply.github.com> Date: Sat, 4 Nov 2023 15:47:31 +0900 Subject: [PATCH 2/4] format --- .../11-object/_samples/incrementAge/script.js | 7 +++++-- docs/1-trial-session/11-object/index.md | 14 ++++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/docs/1-trial-session/11-object/_samples/incrementAge/script.js b/docs/1-trial-session/11-object/_samples/incrementAge/script.js index b88ad2103..b00b062cb 100644 --- a/docs/1-trial-session/11-object/_samples/incrementAge/script.js +++ b/docs/1-trial-session/11-object/_samples/incrementAge/script.js @@ -3,7 +3,10 @@ function incrementAge(person) { return person; } -const tanaka = { name: "田中", age: 18 }, sato = { name: "佐藤", age: 22 }; +const tanaka = { name: "田中", age: 18 }, + sato = { name: "佐藤", age: 22 }; const nextYearTanaka = incrementAge(tanaka); const nextYearSato = incrementAge(sato); -document.write(`田中は ${nextYearTanaka.age} 歳、佐藤は ${nextYearSato.age} 歳`); +document.write( + `田中は ${nextYearTanaka.age} 歳、佐藤は ${nextYearSato.age} 歳`, +); diff --git a/docs/1-trial-session/11-object/index.md b/docs/1-trial-session/11-object/index.md index 404fc104f..cddf871ba 100644 --- a/docs/1-trial-session/11-object/index.md +++ b/docs/1-trial-session/11-object/index.md @@ -136,11 +136,14 @@ function incrementAge(person) { // ここに書く } -const tanaka = { name: "田中", age: 18 }, sato = { name: "佐藤", age: 22 }; +const tanaka = { name: "田中", age: 18 }, + sato = { name: "佐藤", age: 22 }; const nextYearTanaka = incrementAge(tanaka); const nextYearSato = incrementAge(sato); // 同じ関数を tanaka と sato に使い回せる // 19 歳、23 歳 と表示されてほしい -document.write(`田中は ${nextYearTanaka.age} 歳、佐藤は ${nextYearSato.age} 歳`); +document.write( + `田中は ${nextYearTanaka.age} 歳、佐藤は ${nextYearSato.age} 歳`, +); ``` @@ -151,10 +154,13 @@ function incrementAge(person) { return person; } -const tanaka = { name: "田中", age: 18 }, sato = { name: "佐藤", age: 22 }; +const tanaka = { name: "田中", age: 18 }, + sato = { name: "佐藤", age: 22 }; const nextYearTanaka = incrementAge(tanaka); const nextYearSato = incrementAge(sato); -document.write(`田中は ${nextYearTanaka.age} 歳、佐藤は ${nextYearSato.age} 歳`); +document.write( + `田中は ${nextYearTanaka.age} 歳、佐藤は ${nextYearSato.age} 歳`, +); ``` From 5dde7330166dc75948abfcd0eb3d72a9a9c9d406 Mon Sep 17 00:00:00 2001 From: na-trium-144 <100704180+na-trium-144@users.noreply.github.com> Date: Mon, 6 Nov 2023 21:08:29 +0900 Subject: [PATCH 3/4] migrate file extension --- docs/1-trial-session/11-object/{index.md => index.mdx} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/1-trial-session/11-object/{index.md => index.mdx} (100%) diff --git a/docs/1-trial-session/11-object/index.md b/docs/1-trial-session/11-object/index.mdx similarity index 100% rename from docs/1-trial-session/11-object/index.md rename to docs/1-trial-session/11-object/index.mdx From 7c9fb94e981ce6e48fe7033e6ff2f2916a302bc1 Mon Sep 17 00:00:00 2001 From: na-trium-144 <100704180+na-trium-144@users.noreply.github.com> Date: Mon, 6 Nov 2023 21:10:28 +0900 Subject: [PATCH 4/4] =?UTF-8?q?=E5=A4=89=E6=95=B0=E5=AE=A3=E8=A8=80?= =?UTF-8?q?=E3=82=92=E8=A4=87=E6=95=B0=E3=81=AE=E6=96=87=E3=81=AB=E5=88=86?= =?UTF-8?q?=E3=81=91=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../11-object/_samples/incrementAge/script.js | 4 ++-- docs/1-trial-session/11-object/index.mdx | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/1-trial-session/11-object/_samples/incrementAge/script.js b/docs/1-trial-session/11-object/_samples/incrementAge/script.js index b00b062cb..5df8084bd 100644 --- a/docs/1-trial-session/11-object/_samples/incrementAge/script.js +++ b/docs/1-trial-session/11-object/_samples/incrementAge/script.js @@ -3,8 +3,8 @@ function incrementAge(person) { return person; } -const tanaka = { name: "田中", age: 18 }, - sato = { name: "佐藤", age: 22 }; +const tanaka = { name: "田中", age: 18 }; +const sato = { name: "佐藤", age: 22 }; const nextYearTanaka = incrementAge(tanaka); const nextYearSato = incrementAge(sato); document.write( diff --git a/docs/1-trial-session/11-object/index.mdx b/docs/1-trial-session/11-object/index.mdx index 2688bb308..4d9117cae 100644 --- a/docs/1-trial-session/11-object/index.mdx +++ b/docs/1-trial-session/11-object/index.mdx @@ -142,10 +142,10 @@ function incrementAge(person) { // ここに書く } -const tanaka = { name: "田中", age: 18 }, - sato = { name: "佐藤", age: 22 }; +const tanaka = { name: "田中", age: 18 }; +const sato = { name: "佐藤", age: 22 }; const nextYearTanaka = incrementAge(tanaka); -const nextYearSato = incrementAge(sato); // 同じ関数を tanaka と sato に使い回せる +const nextYearSato = incrementAge(sato); // 19 歳、23 歳 と表示されてほしい document.write( `田中は ${nextYearTanaka.age} 歳、佐藤は ${nextYearSato.age} 歳`, @@ -160,8 +160,8 @@ function incrementAge(person) { return person; } -const tanaka = { name: "田中", age: 18 }, - sato = { name: "佐藤", age: 22 }; +const tanaka = { name: "田中", age: 18 }; +const sato = { name: "佐藤", age: 22 }; const nextYearTanaka = incrementAge(tanaka); const nextYearSato = incrementAge(sato); document.write(