Merge pull request #2003 from m47h4r/minor-fix-nullish-coalescing-operator
minor fix: precedence is 5 according to MDN
This commit is contained in:
commit
1f6b1c77d8
1 changed files with 1 additions and 1 deletions
|
@ -68,7 +68,7 @@ Which behavior is better depends on a particular use case. When zero height is a
|
|||
|
||||
## Precedence
|
||||
|
||||
The precedence of the `??` operator is rather low: `7` in the [MDN table](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence#Table).
|
||||
The precedence of the `??` operator is rather low: `5` in the [MDN table](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence#Table).
|
||||
|
||||
So `??` is evaluated after most other operations, but before `=` and `?`.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue