Skip to content

Commit a2d7db5

Browse files
committed
Merge branch 'master' of github.com:javascript-tutorial/en.javascript.info into sync-71da17e5
2 parents 3184160 + 71da17e commit a2d7db5

File tree

29 files changed

+83
-51
lines changed

29 files changed

+83
-51
lines changed

Diff for: 1-js/02-first-steps/08-operators/article.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -194,22 +194,22 @@ Here's an extract from the [precedence table](https://developer.mozilla.org/en-U
194194
| Precedence | Name | Sign |
195195
|------------|------|------|
196196
| ... | ... | ... |
197-
| 17 | unary plus | `+` |
198-
| 17 | unary negation | `-` |
199-
| 16 | exponentiation | `**` |
200-
| 15 | multiplication | `*` |
201-
| 15 | division | `/` |
202-
| 13 | addition | `+` |
203-
| 13 | subtraction | `-` |
197+
| 15 | unary plus | `+` |
198+
| 15 | unary negation | `-` |
199+
| 14 | exponentiation | `**` |
200+
| 13 | multiplication | `*` |
201+
| 13 | division | `/` |
202+
| 12 | addition | `+` |
203+
| 12 | subtraction | `-` |
204204
| ... | ... | ... |
205-
| 3 | assignment | `=` |
205+
| 2 | assignment | `=` |
206206
| ... | ... | ... |
207207

208-
As we can see, the "unary plus" has a priority of `17` which is higher than the `13` of "addition" (binary plus). That's why, in the expression `"+apples + +oranges"`, unary pluses work before the addition.
208+
As we can see, the "unary plus" has a priority of `15` which is higher than the `13` of "addition" (binary plus). That's why, in the expression `"+apples + +oranges"`, unary pluses work before the addition.
209209
210210
## Assignment
211211
212-
Let's note that an assignment `=` is also an operator. It is listed in the precedence table with the very low priority of `3`.
212+
Let's note that an assignment `=` is also an operator. It is listed in the precedence table with the very low priority of `2`.
213213

214214
That's why, when we assign a variable, like `x = 2 * 2 + 1`, the calculations are done first and then the `=` is evaluated, storing the result in `x`.
215215

Diff for: 1-js/04-object-basics/06-constructor-new/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Constructor, operator "new"
22

3-
The regular `{...}` syntax allows to create one object. But often we need to create many similar objects, like multiple users or menu items and so on.
3+
The regular `{...}` syntax allows us to create one object. But often we need to create many similar objects, like multiple users or menu items and so on.
44

55
That can be done using constructor functions and the `"new"` operator.
66

Diff for: 1-js/05-data-types/10-destructuring-assignment/destructuring-complex.svg

+1-1
Loading

Diff for: 1-js/06-advanced-functions/01-recursion/recursive-salaries.svg

+1-1
Loading
Loading

Diff for: 1-js/07-object-properties/01-property-descriptors/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ for (let key in user) {
318318

319319
...But that does not copy flags. So if we want a "better" clone then `Object.defineProperties` is preferred.
320320

321-
Another difference is that `for..in` ignores symbolic properties, but `Object.getOwnPropertyDescriptors` returns *all* property descriptors including symbolic ones.
321+
Another difference is that `for..in` ignores symbolic and non-enumerable properties, but `Object.getOwnPropertyDescriptors` returns *all* property descriptors including symbolic and non-enumerable ones.
322322

323323
## Sealing an object globally
324324

Diff for: 1-js/11-async/01-callbacks/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,4 +307,4 @@ Also, the functions named `step*` are all of single use, they are created only t
307307

308308
We'd like to have something better.
309309

310-
Luckily, there are other ways to avoid such pyramids. One of the best ways is to use "promises," described in the next chapter.
310+
Luckily, there are other ways to avoid such pyramids. One of the best ways is to use "promises", described in the next chapter.

Diff for: 1-js/11-async/02-promise-basics/promise-reject-1.svg

+1-1
Loading
+1-1
Loading

Diff for: 1-js/11-async/08-async-await/01-rewrite-async/solution.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ async function loadJson(url) { // (1)
1313
throw new Error(response.status);
1414
}
1515

16-
loadJson('no-such-user.json')
16+
loadJson('https://javascript.info/no-such-user.json')
1717
.catch(alert); // Error: 404 (4)
1818
```
1919

Diff for: 1-js/11-async/08-async-await/01-rewrite-async/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ function loadJson(url) {
1515
});
1616
}
1717

18-
loadJson('no-such-user.json')
18+
loadJson('https://javascript.info/no-such-user.json')
1919
.catch(alert); // Error: 404
2020
```

Diff for: 1-js/12-generators-iterators/1-generators/generateSequence-2.svg

+1-1
Loading

Diff for: 1-js/12-generators-iterators/1-generators/generateSequence-3.svg

+1-1
Loading

Diff for: 1-js/12-generators-iterators/2-async-iterators-generators/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ An example of use (shows commit authors in console):
376376
377377
for await (const commit of fetchCommits('javascript-tutorial/en.javascript.info')) {
378378
379-
console.log(commit.author.name);
379+
console.log(commit.author.login);
380380
381381
if (++count == 100) { // let's stop at 100 commits
382382
break;

0 commit comments

Comments
 (0)