diff --git a/1-js/02-first-steps/12-while-for/article.md b/1-js/02-first-steps/12-while-for/article.md index 382adadac7..b3e3953b8f 100644 --- a/1-js/02-first-steps/12-while-for/article.md +++ b/1-js/02-first-steps/12-while-for/article.md @@ -256,7 +256,7 @@ For even values of `i`, the `continue` directive stops executing the body and pa ````smart header="The `continue` directive helps decrease nesting" A loop that shows odd values could look like this: -```js +```js run for (let i = 0; i < 10; i++) { if (i % 2) { @@ -268,7 +268,7 @@ for (let i = 0; i < 10; i++) { From a technical point of view, this is identical to the example above. Surely, we can just wrap the code in an `if` block instead of using `continue`. -But as a side-effect, this created one more level of nesting (the `alert` call inside the curly braces). If the code inside of`if` is longer than a few lines, that may decrease the overall readability. +But as a side-effect, this created one more level of nesting (the `alert` call inside the curly braces). If the code inside of `if` is longer than a few lines, that may decrease the overall readability. ```` ````warn header="No `break/continue` to the right side of '?'" diff --git a/1-js/11-async/08-async-await/01-rewrite-async/task.md b/1-js/11-async/08-async-await/01-rewrite-async/task.md index ad33fdb230..e2fd375d97 100644 --- a/1-js/11-async/08-async-await/01-rewrite-async/task.md +++ b/1-js/11-async/08-async-await/01-rewrite-async/task.md @@ -15,6 +15,6 @@ function loadJson(url) { }) } -loadJson('no-such-user.json') // (3) +loadJson('no-such-user.json') .catch(alert); // Error: 404 ``` diff --git a/1-js/12-generators-iterators/1-generators/article.md b/1-js/12-generators-iterators/1-generators/article.md index 9be227ad90..d9d3e9446f 100644 --- a/1-js/12-generators-iterators/1-generators/article.md +++ b/1-js/12-generators-iterators/1-generators/article.md @@ -347,7 +347,7 @@ generator.next(4); // --> pass the result into the generator 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`. -Please note, the outer code does not have to immediately call`next(4)`. It may take time. That's not a problem: the generator will wait. +Please note, the outer code does not have to immediately call `next(4)`. It may take time. That's not a problem: the generator will wait. For instance: diff --git a/4-binary/02-text-decoder/article.md b/4-binary/02-text-decoder/article.md index d9f5e8fa55..fe9b8c0420 100644 --- a/4-binary/02-text-decoder/article.md +++ b/4-binary/02-text-decoder/article.md @@ -58,7 +58,7 @@ alert( new TextDecoder().decode(binaryString) ); // Hello The syntax is: -```js run +```js let encoder = new TextEncoder(); ```