Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/1-trial-session/07-if-statement/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import Term from "@site/src/components/Term";
import ViewSource from "@site/src/components/ViewSource";
import Answer from "@site/src/components/Answer";

## if 構文
## if

**if 構文**は、<Term type="javascript">JavaScript</Term> の<Term strong type="javascriptControlFlow">制御構造</Term>で、特定の条件下のみで実行されるプログラムを記述することができます。
**if **は、<Term type="javascript">JavaScript</Term> の<Term strong type="javascriptControlFlow">制御構造</Term>で、特定の条件下のみで実行されるプログラムを記述することができます。

## 基本構造

Expand Down
4 changes: 2 additions & 2 deletions docs/1-trial-session/09-functions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ let age = 21;
let hasDriverLicense = true;
let isDrunk = true;
function tryToDrive() {
// if 構文で実行する式が一行だけの場合、{} を省略できます。
// if 文で実行する式が一行だけの場合、{} を省略できます。
if (age < 18) return;
if (!hasDriverLicense) return;
if (isDrunk) return;
Expand Down Expand Up @@ -191,7 +191,7 @@ function max(a, b) {

:::note

`a > b` が `true` の場合、if 構文内部の `return` で関数実行が中断されるため、`else` キーワードは必ずしも必要ではありません。そのため、以下のように書くこともできます。
`a > b` が `true` の場合、if 文内部の `return` で関数実行が中断されるため、`else` キーワードは必ずしも必要ではありません。そのため、以下のように書くこともできます。

```javascript
function max(a, b) {
Expand Down