Merge pull request #2846 from jovton/master
Update unary + (plus) operator precedence explanation
This commit is contained in:
commit
3ce3f3dc22
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue