Skip to content

Commit 9a11782

Browse files
authored
feat : for..ofの説明からGenerator関数の説明を削除 (#1560)
Generator関数はJSPrimerで取り扱っていないため、説明を削除する。 削除に伴い、後の文章との整合性を保つため一部修正。 関連するIssue #1559
1 parent a9ed85b commit 9a11782

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

source/basic/loop/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -369,10 +369,8 @@ for...in文が列挙する配列オブジェクトのプロパティ名は、要
369369
JavaScriptでは、`Symbol.iterator`という特別な名前のメソッドを実装したオブジェクトを**iterable**と呼びます。
370370
iterableオブジェクトは、for...of文で反復処理できます。
371371

372-
iterableについてはgeneratorと密接な関係がありますが、ここでは反復処理時の動作が定義されたオブジェクトと認識していれば問題ありません。
373-
374-
iterableオブジェクトは反復処理時に次の返す値を定義しています。
375-
それに対して、for...of文では、`iterable`から値を1つ取り出し、`variable`に代入して反復処理を行います。
372+
iterableオブジェクトは反復処理時の動作が定義されたオブジェクトの総称で、反復処理時に次の返す値を定義しています。
373+
for...of文では、iterableオブジェクトから次の返す値を1つ取り出し、variableに代入して反復処理を行います。
376374

377375
<!-- doctest:disable -->
378376
```js

0 commit comments

Comments
 (0)