HTML Diff
0 added 0 removed
Original 2026-01-01
Modified 2026-03-09
1 <p>Excellent! We found an error. As Descartes said: “If the bug is reproduced, then it exists”.</p>
1 <p>Excellent! We found an error. As Descartes said: “If the bug is reproduced, then it exists”.</p>
2 <p>Where is the error? Now the program has two separate checks. And these checks can work simultaneously. When this happens, two messages appear.</p>
2 <p>Where is the error? Now the program has two separate checks. And these checks can work simultaneously. When this happens, two messages appear.</p>
3 <p>To correct the error, let’s first introduce new checks with negation:</p>
3 <p>To correct the error, let’s first introduce new checks with negation:</p>
4 <ul><li><em>no</em>developers are on vacation;</li>
4 <ul><li><em>no</em>developers are on vacation;</li>
5 <li><em>no</em>developers are out sick.</li>
5 <li><em>no</em>developers are out sick.</li>
6 </ul><p>In these conditions, the keyword is “no”, which means that they must be executed in cases where the value of the variable is false and not executed if the value is true.</p>
6 </ul><p>In these conditions, the keyword is “no”, which means that they must be executed in cases where the value of the variable is false and not executed if the value is true.</p>
7 <p>To create checks with negation, unary (single) logical operator ! is used. Example:</p>
7 <p>To create checks with negation, unary (single) logical operator ! is used. Example:</p>
8 var condition = false; if (!condition) { // code will be executed }<p>Practice using the negation in the program “Can I start the project?”.</p>
8 var condition = false; if (!condition) { // code will be executed }<p>Practice using the negation in the program “Can I start the project?”.</p>