up
This commit is contained in:
parent
4ae129054e
commit
ab9ab64bd5
476 changed files with 3370 additions and 532 deletions
|
@ -0,0 +1,16 @@
|
|||
The answer: `3`.
|
||||
|
||||
```js run
|
||||
alert( null || 2 && 3 || 4 );
|
||||
```
|
||||
|
||||
The precedence of AND `&&` is higher than `||`, so it executes first.
|
||||
|
||||
The result of `2 && 3 = 3`, so the expression becomes:
|
||||
|
||||
```
|
||||
null || 3 || 4
|
||||
```
|
||||
|
||||
Now the result if the first truthy value: `3`.
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue