From 95aca4b4d8fa62815d4bd412fff1a364f842814a Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Thu, 29 Apr 2021 16:16:42 -0700 Subject: remove retired locales (#699) --- .../web/javascript/reference/operators/index.html | 295 --------------------- 1 file changed, 295 deletions(-) delete mode 100644 files/tr/conflicting/web/javascript/reference/operators/index.html (limited to 'files/tr/conflicting/web/javascript/reference/operators/index.html') diff --git a/files/tr/conflicting/web/javascript/reference/operators/index.html b/files/tr/conflicting/web/javascript/reference/operators/index.html deleted file mode 100644 index 08ec51807a..0000000000 --- a/files/tr/conflicting/web/javascript/reference/operators/index.html +++ /dev/null @@ -1,295 +0,0 @@ ---- -title: Arithmetic operators -slug: conflicting/Web/JavaScript/Reference/Operators -tags: - - Aritmetik Operatörler - - JavaScript -translation_of: Web/JavaScript/Reference/Operators -translation_of_original: Web/JavaScript/Reference/Operators/Arithmetic_Operators -original_slug: Web/JavaScript/Reference/Operatörler/Arithmetic_Operators ---- -
{{jsSidebar("Operators")}}
- -

Aritmetik operatörler sayısal değerleri (değişmez değerler veya değişkenler) kendi değişkeni olarak alır ve tek bir sayısal değer döndürür. Standart aritmetik operatörler toplama (+), çıkarma (-), çıkarma (*), ve bölme (/).

- -
{{EmbedInteractiveExample("pages/js/expressions-arithmetic.html")}}
- - - -

Toplama (+)

- -

Toplama işleci, sayısal değişkenlerin veya dize birleşiminin toplamını üretir.

- -

Syntax

- -
Operator: x + y
-
- -

Examples

- -
// Number + Number -> Toplama
-1 + 2 // 3
-
-// Boolean + Number -> Toplama
-true + 1 // 2
-
-// Boolean + Boolean -> Toplama
-false + false // 0
-
-// Number + String -> Birleşim
-5 + 'foo' // "5foo"
-
-// String + Boolean -> Birleşim
-'foo' + false // "foofalse"
-
-// String + String -> Birleşim
-'foo' + 'bar' // "foobar"
-
- -

Çıkarma (-)

- -

Çıkarma işleci (operator), iki değişkeni çıkarır ve farklarını üretir.

- -

Söz Dizimi

- -
Operator: x - y
-
- -

Örnekler

- -
5 - 3 // 2
-3 - 5 // -2
-'foo' - 3 // NaN(Sayı Değil)
- -

Bölme (/)

- -

Bölme operatörü, sol değişkenin bölüm olduğu ve sağ değişkenin bölen olduğu işlenenlerin bölümünü üretir.

- -

Söz Dizimi

- -
Operator: x / y
-
- -

Örnekler

- -
1 / 2      // 0.5 döndürür
-1 / 2      // Java''da 0 döndürür
-// (her iki sayı da açıkça kayan nokta sayısıdır)
-
-1.0 / 2.0  // JavaScript ve Java 0.5 döndürür
-
-2.0 / 0    // JavaScript sonsuz döndürür
-2.0 / 0.0  // Sonsuzu da döndürür
-2.0 / -0.0 // JavaScript eksi sonsuz da döndürür
- -

Çarpma (*)

- -

Çarpma operatörü değişkenlerin ürününü üretir.

- -

Söz Dizimi

- -
Operator: x * y
-
- -

Örnekler

- -
2 * 2 // 4
--2 * 2 // -4
-Infinity * 0 // NaN(Sayı Değil1)
-Infinity * Infinity // Sonsuz
-'foo' * 2 // NaN
-
- -

Kalan (%)

- -

Kalan operatörü, bir değişken ikinci bir değişken tarafından bölündüğünde kalan döndürür. Her zaman bölüm işareti alır.

- -

Söz Dizimi

- -
Operator: var1 % var2
-
- -

Örnekler

- -
12 % 5 // 2
--1 % 2 // -1
-1 % -2 // 1
-NaN % 2 // NaN
-1 % 2 // 1
-2 % 3 // 2
--4 % 2 // -0
-5.5 % 2 // 1.5
-
- -

Üs (**)

- -

The exponentiation operator returns the result of raising first operand to the power second operand. That is, var1var2, in the preceding statement, where var1 and var2 are variables. Exponentiation operator is right associative. a ** b ** c is equal to a ** (b ** c).

- -

Syntax

- -
Operator: var1 ** var2
-
- -

Notes

- -

In most languages like PHP and Python and others that have an exponentiation operator (**), the exponentiation operator is defined to have a higher precedence than unary operators such as unary + and unary -, but there are a few exceptions. For example, in Bash the ** operator is defined to have a lower precedence than unary operators. In JavaScript, it is impossible to write an ambiguous exponentiation expression, i.e. you cannot put a unary operator (+/-/~/!/delete/void/typeof) immediately before the base number.

- -
-2 ** 2;
-// 4 in Bash, -4 in other languages.
-// This is invalid in JavaScript, as the operation is ambiguous.
-
-
--(2 ** 2);
-// -4 in JavaScript and the author's intention is unambiguous.
-
- -

Examples

- -
2 ** 3 // 8
-3 ** 2 // 9
-3 ** 2.5 // 15.588457268119896
-10 ** -1 // 0.1
-NaN ** 2 // NaN
-
-2 ** 3 ** 2 // 512
-2 ** (3 ** 2) // 512
-(2 ** 3) ** 2 // 64
-
- -

To invert the sign of the result of an exponentiation expression:

- -
-(2 ** 2) // -4
-
- -

To force the base of an exponentiation expression to be a negative number:

- -
(-2) ** 2 // 4
-
- -
-

Note: JavaScript also has a bitwise operator ^ (logical XOR). ** and ^ are different (for example : 2 ** 3 === 8 when 2 ^ 3 === 1.)

-
- -

Artırma (++)

- -

Artış operatörü işlenenini artırır (bir ekler) ve bir değer döndürür.

- - - -

Söz Dizimi

- -
Operator: x++ yada ++x
-
- -

Örnekler

- -
// Postfix
-var x = 3;
-y = x++; // y = 3, x = 4
-
-// Prefix
-var a = 2;
-b = ++a; // a = 3, b = 3
-
- -

Azaltma (--)

- -

The decrement operator decrements (subtracts one from) its operand and returns a value.

- - - -

Syntax

- -
Operator: x-- or --x
-
- -

Examples

- -
// Postfix
-var x = 3;
-y = x--; // y = 3, x = 2
-
-// Prefix
-var a = 2;
-b = --a; // a = 1, b = 1
-
- -

Unary negation (-)

- -

The unary negation operator precedes its operand and negates it.

- -

Syntax

- -
Operator: -x
-
- -

Examples

- -
var x = 3;
-y = -x; // y = -3, x = 3
-
-// Unary negation operator can convert non-numbers into a number
-var x = "4";
-y = -x; // y = -4
-
- -

Unary plus (+)

- -

The unary plus operator precedes its operand and evaluates to its operand but attempts to convert it into a number, if it isn't already. Although unary negation (-) also can convert non-numbers, unary plus is the fastest and preferred way of converting something into a number, because it does not perform any other operations on the number. It can convert string representations of integers and floats, as well as the non-string values true, false, and null. Integers in both decimal and hexadecimal ("0x"-prefixed) formats are supported. Negative numbers are supported (though not for hex). If it cannot parse a particular value, it will evaluate to {{jsxref("NaN")}}.

- -

Syntax

- -
Operator: +x
-
- -

Examples

- -
+3     // 3
-+'3'   // 3
-+true  // 1
-+false // 0
-+null  // 0
-+function(val){ return val } // NaN
-
- -

Specifications

- - - - - - - - - - - - - - - - - - - - - -
Specification
{{SpecName('ESDraft', '#sec-additive-operators', 'Additive operators')}}
{{SpecName('ESDraft', '#sec-postfix-expressions', 'Postfix expressions')}}
{{SpecName('ESDraft', '#sec-11.5', 'Multiplicative operators')}}
{{SpecName('ESDraft', '#sec-11.4', 'Unary operator')}}
- -

Browser compatibility

- - - -

{{Compat("javascript.operators.arithmetic")}}

- -

See also

- - -- cgit v1.2.3-54-g00ecf