Skip to content

Commit ad93b73

Browse files
committed
2-alert-or finish translation
1 parent a0d0439 commit ad93b73

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
The answer: first `1`, then `2`.
1+
Răspunsul este: prima dată `1`, apoi `2`.
22

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

7-
The call to `alert` does not return a value. Or, in other words, it returns `undefined`.
7+
Metoda `alert` nu întoarce o valoare. Prin alte cuvinte, întoarce `undefined`.
88

9-
1. The first OR `||` evaluates its left operand `alert(1)`. That shows the first message with `1`.
10-
2. The `alert` returns `undefined`, so OR goes on to the second operand searching for a truthy value.
11-
3. The second operand `2` is truthy, so the execution is halted, `2` is returned and then shown by the outer alert.
9+
1. Primul ORI `||` evaluează operantul din stânga sa `alert(1)`. Acesta afișează primul mesaj cu `1`.
10+
2. `alert` întoarce `undefined`, prin urmare, ORI merge la cel de al doilea operant, deaorece caută o valoare truthy.
11+
3. Cel de al doilea operant `2` este truthy, așa că execuția este oprită, `2` este returnat fiind afișat de către `alert`-ul exterior.
1212

13-
There will be no `3`, because the evaluation does not reach `alert(3)`.
13+
`3` nu va fi afișat, deoarece evaluarea nu ajunge la `alert(3)`.

1-js/02-first-steps/11-logical-operators/2-alert-or/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's the result of OR'ed alerts?
5+
# Care este rezultatul alertelor combinate prin ORI?
66

7-
What will the code below output?
7+
Care va vi output-ul codului de mai jos?
88

99
```js
1010
alert( alert(1) || 2 || alert(3) );

0 commit comments

Comments
 (0)