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
+34-34Lines changed: 34 additions & 34 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
+
# Loginiai operatoriai
2
2
3
-
There are three logical operators in JavaScript: `||` (OR), `&&` (AND), `!` (NOT).
3
+
JavaScript yra trys loginiai operatoriai: `||` (OR - arba), `&&` (AND - ir), `!` (NOT - ne).
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
+
Nors jie vadinami "loginiais", juos galima naudoti su bet kokio tipo vertėmis, ne vien loginėmis. Jų rezultatas taip pat gali būti bet kokio tipo.
6
6
7
-
Let's see the details.
7
+
Pažiūrėkime detaliau.
8
8
9
9
## || (OR)
10
10
11
-
The "OR" operator is represented with two vertical line symbols:
11
+
Dvi vertikalios linijos atstoja "ARBA" operatorių:
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
+
Klasikiniame programavime, loginis ARBA yra skirtas manipuliuoti tik logines vertes. Jeigu bent vienas jo argumentas yra`true`, tai ir jis grąžina `true`, kitu atveju grąžina`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 operatorius yra šiek tiek sudėtingesnis ir galingesnis. Bet visų pirma pažvelkime kas nutinka su loginėmis vertėmis.
0 commit comments