From f759f385449a4ddcab0929654983dacc243ce25f Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Wed, 13 Nov 2019 22:15:43 +0300 Subject: [PATCH] minor --- 1-js/12-generators-iterators/1-generators/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/12-generators-iterators/1-generators/article.md b/1-js/12-generators-iterators/1-generators/article.md index c9d78da3..38ed9faa 100644 --- a/1-js/12-generators-iterators/1-generators/article.md +++ b/1-js/12-generators-iterators/1-generators/article.md @@ -343,7 +343,7 @@ generator.next(4); // --> pass the result into the generator ![](genYield2.svg) -1. The first call `generator.next()` is always without an argument. It starts the execution and returns the result of the first `yield "2+2=?"`. At this point the generator pauses the execution (still on that line). +1. The first call `generator.next()` should be always made without an argument (the argument is ignored if passed). It starts the execution and returns the result of the first `yield "2+2=?"`. At this point the generator pauses the execution, freezing itself on the line `(*)`. 2. Then, as shown at the picture above, the result of `yield` gets into the `question` variable in the calling code. 3. On `generator.next(4)`, the generator resumes, and `4` gets in as the result: `let result = 4`.