Skip to content

Commit dc94976

Browse files
authored
update description (#694)
1 parent b563b53 commit dc94976

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

modules/45-logic/70-logical-expressions/description.ru.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,20 @@ theory: |
7777
console.log(!answer); // => false
7878
```
7979
80+
Отрицание работает внутри выражений:
81+
82+
```javascript
83+
!false || ''; // true
84+
```
85+
86+
Если выражение обернуть в скобки и поставить перед ними `!`, то будет отрицание всего выражения:
87+
88+
```javascript
89+
// Выражение обернуто в скобки
90+
console.log(!('' === false)); // => true
91+
console.log(!('' == false)); // => false
92+
```
93+
8094
При двойном отрицании `!!` итоговое значение равно начальному:
8195
8296
```javascript

0 commit comments

Comments
 (0)