Skip to content

Commit 1e59490

Browse files
committed
4-alert-and finish translation
1 parent 47660e7 commit 1e59490

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
The answer: `1`, and then `undefined`.
1+
Răspunsul: `1`, iar apoi `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).
8-
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.
7+
Metoda `alert` întoarce `undefined` (afișează doar un mesaj, deci nu întoarce nimic semnificativ).
108

9+
Din cauza aceasta, `&&` evaluează operantul din stânga (output-ul `1`), și oprește imediat evaluarea, deoarece `undefined` este o valoare falsy. `&&` caută o valoare falsy și o întoarce, așadar procesul este finalizat.

1-js/02-first-steps/11-logical-operators/4-alert-and/task.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ importance: 3
22

33
---
44

5-
# What is the result of AND'ed alerts?
5+
# Care este rezultatul alertelor combinate cu ȘI?
66

7-
What will this code show?
7+
Ce va afișa codul de mai jos?
88

99
```js
1010
alert( alert(1) && alert(2) );

0 commit comments

Comments
 (0)