Merge pull request #1894 from mKawi/patch-1
Fix Typo in logical operators
This commit is contained in:
commit
9353a04156
1 changed files with 2 additions and 2 deletions
|
@ -128,8 +128,8 @@ This leads to some interesting usage compared to a "pure, classical, boolean-onl
|
|||
In the example below, the first message is printed, while the second is not:
|
||||
|
||||
```js run no-beautify
|
||||
*!*true*/!* || alert("printed");
|
||||
*!*false*/!* || alert("not printed");
|
||||
*!*true*/!* || alert("not printed");
|
||||
*!*false*/!* || alert("printed");
|
||||
```
|
||||
|
||||
In the first line, the OR `||` operator stops the evaluation immediately upon seeing `true`, so the `alert` isn't run.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue