Skip to content

Commit d13006b

Browse files
authored
課題 -> 演習 (第3章まで) (#720)
1 parent ffbf2ba commit d13006b

File tree

21 files changed

+40
-38
lines changed

21 files changed

+40
-38
lines changed

docs/1-trial-session/06-boolean/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const canRideRollerCoasters = age >= 10 && height >= 140; // true
6060

6161
`&&``||` よりも比較<Term>演算子</Term>の方が<Term type="javascriptOperatorPriority">優先順位</Term>が高いため、最後の例のように複数の条件を「かつ」「または」などで組み合わせることは容易です。
6262

63-
## 課題
63+
## 演習
6464

6565
次のコードは何を表示するでしょうか。そしてそれはなぜでしょうか。
6666

docs/1-trial-session/09-loop/_samples/answer-for/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
<html lang="ja">
33
<head>
44
<meta charset="utf-8" />
5-
<title>課題の解答</title>
5+
<title>演習の解答</title>
66
</head>
7+
78
<body>
89
<script src="./script.js"></script>
910
</body>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ document.write(studentNames["0"]); // 田中
9797

9898
:::
9999

100-
## 課題
100+
## 演習
101101

102-
### 初級課題
102+
### 初級演習
103103

104104
田中さんを表すオブジェクトを定義します。
105105

@@ -133,7 +133,7 @@ document.write(tanaka.scores.japanese);
133133

134134
</Answer>
135135

136-
### 中級課題
136+
### 中級演習
137137

138138
{/* prettier-ignore */}
139139
<Term>オブジェクト</Term>も<Term>値</Term>の一種なので、<Term>関数</Term>の<Term>引数</Term>や<Term>戻り値</Term>として使用できます。

docs/1-trial-session/12-css/index.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ CSS の<Term type="cssProperty">プロパティ</Term>には `color` (文字色)
148148

149149
:::
150150

151-
## 課題
151+
## 演習
152152

153-
### 基礎課題1 (セレクタ)
153+
### 基礎演習1 (セレクタ)
154154

155155
次のような条件を満たす要素を選択するセレクタは何でしょうか。
156156

@@ -164,7 +164,7 @@ CSS の<Term type="cssProperty">プロパティ</Term>には `color` (文字色)
164164

165165
</Answer>
166166

167-
### 基礎課題2 (Hello CSS!)
167+
### 基礎演習2 (Hello CSS!)
168168

169169
下のような、文字色が黄色、背景色が好きな色 (この例では黒) の `Hello CSS!` をブラウザで表示してみましょう。
170170

@@ -199,7 +199,7 @@ CSS の<Term type="cssProperty">プロパティ</Term>には `color` (文字色)
199199

200200
</Answer>
201201

202-
### 中級課題
202+
### 中級演習
203203

204204
画像のようなシンプルなボックスを作ってみましょう。
205205

docs/1-trial-session/13-dom/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ packingList.appendChild(newItem);
8888

8989
これで、既存の `ul` 要素の子要素に新しい `li` 要素が追加され、「おやつ」が加わった持ち物リストが表示されます。
9090

91-
## 初級課題
91+
## 初級演習
9292

9393
### 買い物リストの書き換え
9494

@@ -114,7 +114,7 @@ targetItem.textContent = "レモン";
114114

115115
</Answer>
116116

117-
## 中級課題
117+
## 中級演習
118118

119119
### フルーツバスケット
120120

docs/1-trial-session/14-events/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ greetButton.onclick = clicked();
7777

7878
:::
7979

80-
## 課題
80+
## 演習
8181

8282
押すと大きく赤文字が表示される「びっくり箱」のようなボタンを作ってみましょう。
8383

docs/2-browser-apps/01-inspector/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Google Chrome 以外のブラウザにも開発者ツールは搭載されてい
2727

2828
<video src={inspectElementsVideo} muted controls />
2929

30-
### 課題
30+
### 演習
3131

3232
あなたのお気に入りのニュースサイトの記事をひとつ選び、その中に現れる人物名を、 `Elements` タブの機能を用いて自分の名前に変えてみましょう。悪用厳禁です!
3333

@@ -117,7 +117,7 @@ console.log("x + y は、", sum);
117117

118118
:::
119119

120-
### 課題
120+
### 演習
121121

122122
次のプログラムの 5 行目では、`add` 関数は 3 回実行されます。どのような順番で関数が呼び出されているか、デバッガを用いて確認してみてください。
123123

docs/2-browser-apps/02-reference/_samples/answer/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
<html lang="ja">
33
<head>
44
<meta charset="utf-8" />
5-
<title>課題の解答</title>
5+
<title>演習の解答</title>
66
</head>
7+
78
<body>
89
<script src="./script.js"></script>
910
</body>

docs/2-browser-apps/02-reference/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const person = {
6262

6363
![ネストされた参照](./nested-reference.drawio.svg)
6464

65-
## 課題
65+
## 演習
6666

6767
参照の仕組みが特に問題になってくる場合として、オブジェクトの参照先が別の関数によって書き換えられる場合があります。次のコードを実行してみましょう。
6868

@@ -80,7 +80,7 @@ document.write(tanaka.age); // 19 と表示されてしまう
8080

8181
<ViewSource url={import.meta.url} path="_samples/object-mutated-by-function" />
8282

83-
このコードは、[オブジェクト](/docs/trial-session/object/)の項で扱った課題でした。実はこのコードには問題があり、`tanaka` に対して `incrementAge` を適用すると、関数が適用された `tanaka` にも影響が及んでしまいます。これは、関数に渡される値はオブジェクトへの参照で、このオブジェクトは呼び出し元の変数が参照するものと同一のものだからです。
83+
このコードは、[オブジェクト](/docs/trial-session/object/)の項で扱った演習でした。実はこのコードには問題があり、`tanaka` に対して `incrementAge` を適用すると、関数が適用された `tanaka` にも影響が及んでしまいます。これは、関数に渡される値はオブジェクトへの参照で、このオブジェクトは呼び出し元の変数が参照するものと同一のものだからです。
8484

8585
`incrementAge` 関数の実装を変更し、関数に渡したオブジェクトが書き換えられないようにしてください。
8686

docs/2-browser-apps/03-class/index.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ document.write(emptyFunction()); // 値を返さない関数の戻り値は unde
6060

6161
:::
6262

63-
### 課題
63+
### 演習
6464

6565
`weightInTons``cost` をプロパティとして持ち、 `weightInTons` のデフォルト値が `1` であるクラス `Car` を作成し、 `cost` に好きな値を代入してみましょう。
6666

@@ -109,7 +109,7 @@ tanaka.introduceSelf();
109109

110110
:::
111111

112-
### 課題
112+
### 演習
113113

114114
自分自身の年齢を 1 増やすメソッド `incrementAge` を定義して、実行してみてください。
115115

@@ -273,7 +273,7 @@ const tanaka = new FreshmanStudent("田中", "18", "ドイツ語");
273273
tanaka.introduceSelf(); // 私の名前は田中です。18歳です。ドイツ語選択です。
274274
```
275275

276-
### 課題
276+
### 演習
277277

278278
`Student` クラスを継承して `SeniorStudent` クラスを作ってみましょう。`SeniorStudent` クラスのインスタンスは `researchQuestion` プロパティを持ち、`introduceSelf` メソッドを実行すると自分の名前を出力した後に自分の研究内容を紹介するようにしてみましょう。
279279

@@ -380,7 +380,7 @@ document.write(false.toString()); // false
380380

381381
:::
382382

383-
## 課題
383+
## 演習
384384

385385
### `Date` クラス
386386

0 commit comments

Comments
 (0)