Merge pull request #1894 from mKawi/patch-1

Fix Typo in logical operators
This commit is contained in:
Ilya Kantor 2020-05-17 23:44:44 +03:00 committed by GitHub
commit 9353a04156
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.