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/increment/index.html | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 files/fr/web/javascript/reference/operators/increment/index.html (limited to 'files/fr/web/javascript/reference/operators/increment') diff --git a/files/fr/web/javascript/reference/operators/increment/index.html b/files/fr/web/javascript/reference/operators/increment/index.html new file mode 100644 index 0000000000..ab9d79b09f --- /dev/null +++ b/files/fr/web/javascript/reference/operators/increment/index.html @@ -0,0 +1,70 @@ +--- +title: Incrémentation (++) +slug: Web/JavaScript/Reference/Operators/Increment +tags: + - JavaScript + - Language feature + - Operator + - Reference +browser-compat: javascript.operators.increment +translation_of: Web/JavaScript/Reference/Operators/Increment +--- +
{{jsSidebar("Operators")}}
+ +

L'opérateur d'incrémentation (++) permet d'incrémenter (c'est-à-dire d'ajouter un) à son opérande et de renvoyer une valeur qui est le résultat avant ou après la modification.

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

Syntaxe

+ +
+Opérateur : x++ ou ++x
+
+ +

Description

+ +

Utilisé comme suffixe (l'opérateur étant placé après l'opérande), comme dans x++, l'opérateur incrémentera la valeur et renverra la valeur avant l'incrément.

+ +

Utilisé comme préfixe (l'opérateur étant placé avant l'opérande), comme dans ++x, l'opérateur incrémentera la valeur et renverra la valeur après l'incrément.

+ +

Exemples

+ +

Incrément en suffixe

+ +
let x = 3;
+let y = x++;
+
+// y = 3
+// x = 4
+
+ +

Incrément en préfixe

+ +
let a = 2;
+let b = ++a;
+
+// a = 3
+// b = 3
+
+ +

Spécifications

+ +

{{Specifications}}

+ +

Compatibilité des navigateurs

+ +

{{Compat}}

+ +

Voir aussi

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