Skip to content

Commit 535e08c

Browse files
authored
Translated solution.md
1 parent da3283a commit 535e08c

File tree

1 file changed

+3
-3
lines changed
  • 1-js/02-first-steps/11-logical-operators/4-alert-and

1 file changed

+3
-3
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
The answer: `1`, and then `undefined`.
1+
Atsakymas: `1`, ir tada `undefined`.
22

33
```js run
44
alert( alert(1) && alert(2) );
55
```
66

7-
The call to `alert` returns `undefined` (it just shows a message, so there's no meaningful return).
7+
Šaukimas `alert` grąžina `undefined` (tiesiog parodo žinutę, tad nebus prasmingo grąžinimo).
88

9-
Because of that, `&&` evaluates the left operand (outputs `1`), and immediately stops, because `undefined` is a falsy value. And `&&` looks for a falsy value and returns it, so it's done.
9+
Dėl to `&&` įvertina kairį operandą (parodo `1`), ir iš karto sustoja, nes `undefined` yra falsy vertė. O `&&` ieško falsy vertės ir ją grąžina, ir sustoja.
1010

0 commit comments

Comments
 (0)