maintain consistency in example
This commit is contained in:
parent
7895f3d3ae
commit
60cb38dd82
1 changed files with 1 additions and 1 deletions
|
@ -143,7 +143,7 @@ For example:
|
||||||
let accessAllowed = (age > 18) ? true : false;
|
let accessAllowed = (age > 18) ? true : false;
|
||||||
```
|
```
|
||||||
|
|
||||||
Technically, we can omit parentheses around `age > 14`. The question mark operator has a low precedence. It executes after the comparison `>`, so that'll do the same:
|
Technically, we can omit parentheses around `age > 18`. The question mark operator has a low precedence. It executes after the comparison `>`, so that'll do the same:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// the comparison operator "age > 18" executes first anyway
|
// the comparison operator "age > 18" executes first anyway
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue