From 9f030ef5fd3a0dc15d94c01d0e1bbd1aba1eed54 Mon Sep 17 00:00:00 2001 From: SphinxKnight Date: Sun, 27 Jun 2021 15:03:56 +0200 Subject: Fix #756 by updating the JS operators in fr (#1306) * Update Operators landing + revamp L10N for 4 operators * Added NOT / ! - * +multiplication * Addition, exponentiation and comparison * Operateurs de comparaison * Binary ops * Missing newline, thx GH UI * Logical AND / OR * Assignment ops * Conflicting clean-up * Missing EOF newline * Fix history and redirects * FIX: fix flaws * FIX: minox typo fix * FIX: link flaws * FIX: fix tags detection Co-authored-by: tristantheb --- .../reference/operators/addition/index.html | 72 +++++++++------------- 1 file changed, 30 insertions(+), 42 deletions(-) (limited to 'files/fr/web/javascript/reference/operators/addition/index.html') diff --git a/files/fr/web/javascript/reference/operators/addition/index.html b/files/fr/web/javascript/reference/operators/addition/index.html index af5fb528e0..e67da71cd6 100644 --- a/files/fr/web/javascript/reference/operators/addition/index.html +++ b/files/fr/web/javascript/reference/operators/addition/index.html @@ -7,76 +7,64 @@ tags: - Reference translation_of: Web/JavaScript/Reference/Operators/Addition original_slug: Web/JavaScript/Reference/Opérateurs/Addition +browser-compat: javascript.operators.addition ---
{{jsSidebar("Operators")}}
-
L'opérateur d'addition (+) effectue la somme de deux opérandes numériques ou la concaténation de chaînes de caractères.
- - +

L'opérateur d'addition (+) produit la somme de deux opérandes numériques ou la concaténation de deux chaînes de caractères.

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

Syntaxe

+

Syntaxe

-
Opérateur: x + y
+
+Opérateur : x + y
 
-

Exemples

+

Exemples

-

Addition numérique

+

Addition numérique

-
// Nombre + Nombre -> addition
+
+// Number + Number -> addition
 1 + 2 // 3
 
-// Booléen + Nombre -> addition
+// Boolean + Number -> addition
 true + 1 // 2
 
-// Booléen + Booléen -> addition
+// Boolean + Boolean -> addition
 false + false // 0
 
-

Concaténation de chaînes

+

Concaténation de chaînes de caractères

-
// String + String -> concatenation
-'foo' + 'bar' // "foobar"
+
// String + String -> concatenation
+'toto' + 'truc' // "tototruc"
 
 // Number + String -> concatenation
-5 + 'foo' // "5foo"
+5 + 'toto' // "5toto"
 
 // String + Boolean -> concatenation
-'foo' + false // "foofalse"
+'toto' + false // "totofalse"
-

Spécifications

+

Spécifications

- - - - - - - - - -
Spécification
{{SpecName('ESDraft', '#sec-addition-operator-plus', 'Addition operator')}}
+

{{Specifications}}

-

Compatibilité des navigateurs

+

Compatibilité des navigateurs

-

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

+

{{Compat}}

-

Voir aussi

+

Voir aussi

-- cgit v1.2.3-54-g00ecf