From 4b1a9203c547c019fc5398082ae19a3f3d4c3efe Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:41:15 -0500 Subject: initial commit --- .../reference/operators/addition/index.html | 82 ++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 files/de/web/javascript/reference/operators/addition/index.html (limited to 'files/de/web/javascript/reference/operators/addition/index.html') diff --git a/files/de/web/javascript/reference/operators/addition/index.html b/files/de/web/javascript/reference/operators/addition/index.html new file mode 100644 index 0000000000..6f95df95d1 --- /dev/null +++ b/files/de/web/javascript/reference/operators/addition/index.html @@ -0,0 +1,82 @@ +--- +title: Addition (+) +slug: Web/JavaScript/Reference/Operators/Addition +tags: + - JavaScript + - Operator + - Referenz + - Sprachfeature +translation_of: Web/JavaScript/Reference/Operators/Addition +--- +
{{jsSidebar("Operators")}}
+ +

Der Addition-Operator (+) erzeugt die Summe nummerischer Operanden oder setzt Zeichenketten zusammen.

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

Syntax

+ +
Operator: x + y
+
+ +

Beispiele

+ +

Nummerische Addition (Summe)

+ +
// Nummer + Nummer -> Addition (Summe)
+1 + 2 // 3
+
+// Boolean + Nummer -> Addition (Summe, da true = 1)
+true + 1 // 2
+
+// Boolean + Boolean -> Addition (Summe, da false = 0)
+false + false // 0
+
+ +

Zeichenkettenzusammensetzung

+ +
// String (Zeichenkette) + String (Zeichenkette) -> Zusammensetzung
+'foo' + 'bar' // "foobar"
+
+// Nummer + String (Zeichenkette) -> Zusammensetzung
+5 + 'foo' // "5foo"
+
+// String (Zeichenkette) + Boolean -> Zusammensetzung
+'foo' + false // "foofalse"
+ +

Spezifikationen

+ + + + + + + + + + +
Spezifikation
{{SpecName('ESDraft', '#sec-addition-operator-plus', 'Addition Operator')}}
+ +

Browserkompatibilität

+ + + +

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

+ +

Siehe auch

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