Skip to content

Commit 410279a

Browse files
authored
Update precedence for ??, It's 3 instead of 4
1 parent 7000ede commit 410279a

File tree

1 file changed

+1
-1
lines changed
  • 1-js/02-first-steps/12-nullish-coalescing-operator

1 file changed

+1
-1
lines changed

1-js/02-first-steps/12-nullish-coalescing-operator/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ In practice, the zero height is often a valid value, that shouldn't be replaced
106106
107107
## Precedence
108108
109-
The precedence of the `??` operator is the same as `||`. They both equal `4` in the [MDN table](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence#Table).
109+
The precedence of the `??` operator is the same as `||`. They both equal `3` in the [MDN table](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence#Table).
110110
111111
That means that, just like `||`, the nullish coalescing operator `??` is evaluated before `=` and `?`, but after most other operations, such as `+`, `*`.
112112

0 commit comments

Comments
 (0)