Merge pull request #2846 from jovton/master

Update unary + (plus) operator precedence explanation
This commit is contained in:
Ilya Kantor 2022-02-03 13:24:13 +03:00 committed by GitHub
commit 3ce3f3dc22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -205,7 +205,7 @@ Here's an extract from the [precedence table](https://developer.mozilla.org/en-U
| 3 | assignment | `=` | | 3 | assignment | `=` |
| ... | ... | ... | | ... | ... | ... |
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. 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.
## Assignment ## Assignment