Skip to content

Commit d4a82f3

Browse files
authored
Merge pull request #239 from javascript-tutorial/sync-29216730
Sync with upstream @ 2921673
2 parents 959db73 + dda5683 commit d4a82f3

File tree

29 files changed

+104
-54
lines changed

29 files changed

+104
-54
lines changed

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

Lines changed: 10 additions & 10 deletions
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 `12` 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

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

Lines changed: 1 addition & 1 deletion
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

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

Lines changed: 1 addition & 1 deletion
Loading

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

Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 1 addition & 1 deletion
Loading

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ for (let key in user) {
319319

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

322-
Another difference is that `for..in` ignores symbolic properties, but `Object.getOwnPropertyDescriptors` returns *all* property descriptors including symbolic ones.
322+
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.
323323

324324
## Sealing an object globally
325325

1-js/11-async/01-callbacks/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,4 +306,4 @@ Also, the functions named `step*` are all of single use, they are created only t
306306

307307
We'd like to have something better.
308308

309-
Luckily, there are other ways to avoid such pyramids. One of the best ways is to use "promises," described in the next chapter.
309+
Luckily, there are other ways to avoid such pyramids. One of the best ways is to use "promises", described in the next chapter.
Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 1 addition & 1 deletion
Loading

1-js/11-async/05-promise-api/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ That's what `Promise.all` is for.
1313
The syntax is:
1414

1515
```js
16-
let promise = Promise.all([...promises...]);
16+
let promise = Promise.all(iterable);
1717
```
1818

19-
`Promise.all` takes an array of promises (it technically can be any iterable, but is usually an array) and returns a new promise.
19+
`Promise.all` takes an iterable (usually, an array of promises) and returns a new promise.
2020

2121
The new promise resolves when all listed promises are resolved, and the array of their results becomes its result.
2222

0 commit comments

Comments
 (0)