We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f25f2a6 commit c6a51aaCopy full SHA for c6a51aa
1 file changed
1-js/02-first-steps/11-logical-operators/8-if-question/solution.md
@@ -3,17 +3,17 @@ La risposta: il primo e il terzo verranno eseguiti.
3
I dettagli:
4
5
```js run
6
-// Runs.
7
-// The result of -1 || 0 = -1, truthy
+// Viene eseguito
+// Il risultato di -1 || 0 = -1 è vero
8
if (-1 || 0) alert( 'first' );
9
10
-// Doesn't run
11
-// -1 && 0 = 0, falsy
+// Non viene eseguito
+// -1 && 0 = 0, falso
12
if (-1 && 0) alert( 'second' );
13
14
-// Executes
15
-// Operator && has a higher precedence than ||
16
-// so -1 && 1 executes first, giving us the chain:
+// Eseguito
+// L'operatore && ha la precedenza su ||,
+// quindi -1 && 1 vengono eseguiti per primi; la catena dentro `if` diventa:
17
// null || -1 && 1 -> null || 1 -> 1
18
if (null || -1 && 1) alert( 'third' );
19
```
0 commit comments