Skip to content

Commit f8cb281

Browse files
authored
Translated solution.md
1 parent 7fa2669 commit f8cb281

File tree

1 file changed

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

1 file changed

+10
-10
lines changed
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
The answer: the first and the third will execute.
1+
Atsakymas: pirma ir antra bus įvykdytos.
22

33
Details:
44

55
```js run
6-
// Runs.
7-
// The result of -1 || 0 = -1, truthy
8-
if (-1 || 0) alert( 'first' );
6+
// Paleidžiama.
7+
// Rezultatas iš -1 || 0 = -1, truthy
8+
if (-1 || 0) alert( 'pirmas' );
99

10-
// Doesn't run
10+
// Nepaleidžiamas
1111
// -1 && 0 = 0, falsy
12-
if (-1 && 0) alert( 'second' );
12+
if (-1 && 0) alert( 'antras' );
1313

14-
// Executes
15-
// Operator && has a higher precedence than ||
16-
// so -1 && 1 executes first, giving us the chain:
14+
// Įvykdomas
15+
// Operatorius && turi aukštesnį prioritetą negu ||
16+
// tad -1 && 1 įvykdomas pirmiau, sukurdamas mums grandinę:
1717
// null || -1 && 1 -> null || 1 -> 1
18-
if (null || -1 && 1) alert( 'third' );
18+
if (null || -1 && 1) alert( 'trečias' );
1919
```
2020

0 commit comments

Comments
 (0)