You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-js/02-first-steps/08-operators/article.md
+10-10
Original file line number
Diff line number
Diff line change
@@ -194,22 +194,22 @@ Here's an extract from the [precedence table](https://developer.mozilla.org/en-U
194
194
| Precedence | Name | Sign |
195
195
|------------|------|------|
196
196
|...|...|...|
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 |`-`|
204
204
|...|...|...|
205
-
|3| assignment |`=`|
205
+
|2| assignment |`=`|
206
206
|...|...|...|
207
207
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.
209
209
210
210
## Assignment
211
211
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`.
213
213
214
214
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`.
Copy file name to clipboardExpand all lines: 1-js/04-object-basics/06-constructor-new/article.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Constructor, operator "new"
2
2
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.
4
4
5
5
That can be done using constructor functions and the `"new"` operator.
Copy file name to clipboardExpand all lines: 1-js/07-object-properties/01-property-descriptors/article.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -318,7 +318,7 @@ for (let key in user) {
318
318
319
319
...But that does not copy flags. So if we want a "better" clone then `Object.defineProperties` is preferred.
320
320
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.
0 commit comments