You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-js/02-first-steps/11-logical-operators/article.md
+22-22Lines changed: 22 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,24 @@
1
-
# Logical operators
1
+
# Логикалык операторлор
2
2
3
-
There are four logical operators in JavaScript: `||` (OR), `&&` (AND), `!` (NOT), `??` (Nullish Coalescing). Here we cover the first three, the `??`operator is in the next article.
3
+
JavaScript'те төрт логикалык оператор бар: `||` (ЖЕ), `&&` (ЖАНА), `!` (ЭМЕС), `??` (Нөлдүк биригүү оператору). Бул жерде биз биринчи үчөөнү караштырабыз, `??`оператору кийинки бөлүмдө болот.
4
4
5
-
Although they are called "logical", they can be applied to values of any type, not only boolean. Their result can also be of any type.
5
+
Алар "логикалык" деп аталганы менен, логикалык гана эмес, ар кандай түрдөгү маанилерге колдонулушу мүмкүн. Алардын натыйжасы да ар кандай түрдө болушу мүмкүн.
6
6
7
-
Let's see the details.
7
+
Кененирээк карап көрөлү.
8
8
9
-
## || (OR)
9
+
## || (ЖЕ)
10
10
11
-
The "OR" operator is represented with two vertical line symbols:
11
+
"ЖЕ" оператору эки вертикалдуу сызык белгиси менен көрсөтүлөт:
12
12
13
13
```js
14
14
result = a || b;
15
15
```
16
16
17
-
In classical programming, the logical OR is meant to manipulate boolean values only. If any of its arguments are `true`, it returns `true`, otherwise it returns `false`.
17
+
Классикалык программалоодо логикалык ЖЕ логикалык маанилерди гана башкарууга үчүн арналган. Эгерде анын аргументтеринин бири `true` болсо, `true` кайтарылат, антпесе `false` кайтарылат.
18
18
19
-
In JavaScript, the operator is a little bit trickier and more powerful. But first, let's see what happens with boolean values.
19
+
JavaScript'те бул оператор бир аз татаалыраак жана күчтүүрөөк. Бирок адегенде логикалык маанилер менен эмне болорун карап көрөлү.
0 commit comments