Skip to content

Commit 3e067c6

Browse files
committed
「関数」の節の演習問題1の不要な説明を削除
1 parent a5a3a2b commit 3e067c6

File tree

3 files changed

+0
-35
lines changed

3 files changed

+0
-35
lines changed

docs/1-trial-session/09-functions/_samples/max-no-else/index.html

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

docs/1-trial-session/09-functions/_samples/max-no-else/script.js

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

docs/1-trial-session/09-functions/index.mdx

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -189,23 +189,6 @@ function max(a, b) {
189189

190190
<ViewSource url={import.meta.url} path="_samples/max" />
191191

192-
:::note
193-
194-
`a > b``true`の場合、if文内部の`return`で関数実行が中断されるため、`else`キーワードは必ずしも必要ではありません。そのため、次のように書くこともできます。
195-
196-
```javascript
197-
function max(a, b) {
198-
if (a > b) {
199-
return a;
200-
}
201-
return b;
202-
}
203-
```
204-
205-
<ViewSource url={import.meta.url} path="_samples/max-no-else" />
206-
207-
:::
208-
209192
</Answer>
210193

211194
## 演習問題2(発展)

0 commit comments

Comments
 (0)