Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(loop): continueのtypoを修正 #687

Merged
merged 2 commits into from
Mar 12, 2019
Merged
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
11 changes: 8 additions & 3 deletions source/basic/loop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,18 @@ const isPassed = array.some(currentValue => {

## continue文 {#continue-statement}

continue文は処理中の文をスキップして、そのループの`条件式`と移行する制御文です。
while、do-while、forの中で使い、実行中のループの`条件式`へ制御を移します。
continue文は現在の反復処理を終了して、次の反復処理を行います。
continute文は、while、do-while、forの中で使うことができます。

たとえば、while文の処理中で`continue`文が実行されると、現在の反復処理はその時点で終了されます。
そして、次の反復処理で`条件式`を評価するところからループが再開されます。

<!-- doctest:disable -->
```js
while (条件式) {
// 実行される処理
continue; // `条件式` へ
// これ以降の行は実行されません
}
```

Expand All @@ -235,7 +240,7 @@ while (条件式) {
{{book.console}}
[import, continue-filter-even-example.js](src/continue/continue-filter-even-example.js)

もちろん次のように、偶数なら`results`へ追加するという書き方も可能です
もちろん、次のように`continue`文を使わずに「偶数なら`results`へ追加する」という書き方も可能です
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これサンプルがイケてないんだと思う。
この行自体を消したい

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


<!-- doctest:disable -->
```js
Expand Down