Skip to content

Commit ad77bb6

Browse files
committed
Merge branch 'master' of https://github.com/jonnathan-ls/pt.javascript.info into feature/steps-ifelse
2 parents 2c71b37 + 433048b commit ad77bb6

File tree

31 files changed

+108
-55
lines changed

31 files changed

+108
-55
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/08-prototypes/03-native-prototypes/proto-constructor-animal-rabbit.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

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

0 commit comments

Comments
 (0)