Skip to content

Commit c6a51aa

Browse files
authored
Update solution.md
1 parent f25f2a6 commit c6a51aa

File tree

1 file changed

+7
-7
lines changed
  • 1-js/02-first-steps/11-logical-operators/8-if-question

1 file changed

+7
-7
lines changed

1-js/02-first-steps/11-logical-operators/8-if-question/solution.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ La risposta: il primo e il terzo verranno eseguiti.
33
I dettagli:
44

55
```js run
6-
// Runs.
7-
// The result of -1 || 0 = -1, truthy
6+
// Viene eseguito
7+
// Il risultato di -1 || 0 = -1 è vero
88
if (-1 || 0) alert( 'first' );
99

10-
// Doesn't run
11-
// -1 && 0 = 0, falsy
10+
// Non viene eseguito
11+
// -1 && 0 = 0, falso
1212
if (-1 && 0) alert( 'second' );
1313

14-
// Executes
15-
// Operator && has a higher precedence than ||
16-
// so -1 && 1 executes first, giving us the chain:
14+
// Eseguito
15+
// L'operatore && ha la precedenza su ||,
16+
// quindi -1 && 1 vengono eseguiti per primi; la catena dentro `if` diventa:
1717
// null || -1 && 1 -> null || 1 -> 1
1818
if (null || -1 && 1) alert( 'third' );
1919
```

0 commit comments

Comments
 (0)