Skip to content

Commit ce44bd4

Browse files
authored
Update solution.md
1 parent e7e8f97 commit ce44bd4

File tree

1 file changed

+6
-6
lines changed
  • 1-js/02-first-steps/11-logical-operators/2-alert-or

1 file changed

+6
-6
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+
Жообу: башында `1`, анан `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+
`alert` чакыруусу маани кайтарбайт. Же, башкача айтканда, ал `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. Биринчи ЖЕ `||` өзүнүн сол операндын `alert(1)` аткарат. Ал `1` менен биринчи билдирүүнү көрсөтөт.
10+
2. 2. `alert` `undefined`'ди кайтарып берет, андыктан ЖЕ чындык маанисин издеп экинчи операндга өтөт.
11+
3. Экинчи операнд `2` - бул чындык, андыктан аткаруу токтотулат, `2` кайтарылып, андан кийин тышкы `alert` менен көрсөтүлөт.
1212

13-
There will be no `3`, because the evaluation does not reach `alert(3)`.
13+
`3` көрсөтүлбөйт, анткени эсептөө `alert(3)` функциясына жетпейт.

0 commit comments

Comments
 (0)