Skip to content

Commit ebbe5ef

Browse files
authored
Update article.md
1 parent 78bacd5 commit ebbe5ef

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

1-js/02-first-steps/07-operators/article.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
# Operators
1+
# Operatoriai
22

3-
We know many operators from school. They are things like addition `+`, multiplication `*`, subtraction `-`, and so on.
3+
Mes žinome daug operatorių iš mokyklos. Tokie kaip sudėtis `+`, daugyba `*`, atimtis `-` ir taip toliau.
44

5-
In this chapter, we'll concentrate on aspects of operators that are not covered by school arithmetic.
5+
Šiame skyriuje, susikoncentruosime prie tokio operatorių aspekto, kuris nėra aptariamas mokykloje.
66

7-
## Terms: "unary", "binary", "operand"
7+
## Terminai: "unary", "binary", "operand"
88

9-
Before we move on, let's grasp some common terminology.
9+
Prieš tęsiant, išsiaiškinkime įprastinę terminologiją.
1010

11-
- *An operand* -- is what operators are applied to. For instance, in the multiplication of `5 * 2` there are two operands: the left operand is `5` and the right operand is `2`. Sometimes, people call these "arguments" instead of "operands".
12-
- An operator is *unary* if it has a single operand. For example, the unary negation `-` reverses the sign of a number:
11+
- *An operand* -- operandas yra tai kam operatoriai yra naudojami. Pavyzdžiui šioje daugyboje `5 * 2` yra du operandai: kairysis operandas yra `5`, o dešinysis yra `2`. Kartais žmonės juos vadina argumentais, o ne operandais.
12+
- Operatorius yra *unarinis* (ang. *unary*), jeigu turi vieną operandą. Pavyzdžiui unarinis neiginys (ang. negation) `-` paverčia skaičių neigiamu:
1313

1414
```js run
1515
let x = 1;
1616

1717
*!*
1818
x = -x;
1919
*/!*
20-
alert( x ); // -1, unary negation was applied
20+
alert( x ); // -1, pritaikytas unarinis neiginys
2121
```
22-
- An operator is *binary* if it has two operands. The same minus exists in binary form as well:
22+
- Operatorius yra *binarinis* (ang. *binary*) kai turi du operandus. Tas pats minusas egzistuoja ir binarinėse formose:
2323

2424
```js run no-beautify
2525
let x = 1, y = 3;
26-
alert( y - x ); // 2, binary minus subtracts values
26+
alert( y - x ); // 2, binarinis minusas atima vertes
2727
```
2828

29-
Formally, in the examples above we have two different operators that share the same symbol: the negation operator, a unary operator that reverses the sign, and the subtraction operator, a binary operator that subtracts one number from another.
29+
Formaliai aukščiau esančiame pavyzdyje mes turime du skirtingus operatorius, kurie dalinasi tuo pačiu simboliu: neigimo operatorių, t.y. unarinį operatorių, kuris pakeičia simbolį, ir atimties operatorių, t.y. binarinį operatorių, kuris atima vieną skaičių iš kito.
3030

31-
## String concatenation, binary +
31+
## Eilutės sujungimas, binarinis +
3232

3333
Now, let's see special features of JavaScript operators that are beyond school arithmetics.
3434

0 commit comments

Comments
 (0)