aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/javascript/reference/operators/subtraction_assignment/index.md
diff options
context:
space:
mode:
authorjulieng <julien.gattelier@gmail.com>2021-08-03 08:03:09 +0200
committerSphinxKnight <SphinxKnight@users.noreply.github.com>2021-09-03 08:08:25 +0200
commit844f5103992238c0c23203286dad16a466e89c97 (patch)
treed537708951bb2b61be8192ffacc05a0ce6804f89 /files/fr/web/javascript/reference/operators/subtraction_assignment/index.md
parenta70fd5b73ecb10bec3906640023e2a1a46e118a2 (diff)
downloadtranslated-content-844f5103992238c0c23203286dad16a466e89c97.tar.gz
translated-content-844f5103992238c0c23203286dad16a466e89c97.tar.bz2
translated-content-844f5103992238c0c23203286dad16a466e89c97.zip
move *.html to *.md
Diffstat (limited to 'files/fr/web/javascript/reference/operators/subtraction_assignment/index.md')
-rw-r--r--files/fr/web/javascript/reference/operators/subtraction_assignment/index.md49
1 files changed, 49 insertions, 0 deletions
diff --git a/files/fr/web/javascript/reference/operators/subtraction_assignment/index.md b/files/fr/web/javascript/reference/operators/subtraction_assignment/index.md
new file mode 100644
index 0000000000..ad67f469d6
--- /dev/null
+++ b/files/fr/web/javascript/reference/operators/subtraction_assignment/index.md
@@ -0,0 +1,49 @@
+---
+title: Affectation après soustraction (-=)
+slug: Web/JavaScript/Reference/Operators/Subtraction_assignment
+tags:
+ - Assignment operator
+ - JavaScript
+ - Language feature
+ - Operator
+ - Reference
+browser-compat: javascript.operators.subtraction_assignment
+translation-of: Web/JavaScript/Reference/Operators/Subtraction_assignment
+---
+<div>{{jsSidebar("Operators")}}</div>
+
+<p>L'opérateur d'affectation après soustraction (<code>-=</code>) calcule la soustraction de l'opérande gauche par l'opérande droit puis affecte le résultat à la variable représentée par l'opérande gauche.</p>
+
+<div>{{EmbedInteractiveExample("pages/js/expressions-subtraction-assignment.html")}}</div>
+
+<h2 id="syntax">Syntaxe</h2>
+
+<pre class="brush: js">
+<strong>Opérateur :</strong> x -= y
+<strong>Signification :</strong> x = x - y
+</pre>
+
+<h2 id="examples">Exemples</h2>
+
+<h3 id="using_subtraction_assignment">Utiliser l'opérateur de soustraction et d'affectation</h3>
+
+<pre class="brush: js">
+let truc = 5;
+truc -= 2; // 3
+truc -= 'toto'; // NaN
+</pre>
+
+<h2 id="specifications">Spécifications</h2>
+
+<p>{{Specifications}}</p>
+
+<h2 id="browser_compatibility">Compatibilité des navigateurs</h2>
+
+<p>{{Compat}}</p>
+
+<h2 id="see_also">Voir aussi</h2>
+
+<ul>
+ <li><a href="/fr/docs/Web/JavaScript/Guide/Expressions_and_Operators#assignment">Les opérateurs d'affectation dans le guide JavaScript</a></li>
+ <li><a href="/fr/docs/Web/JavaScript/Reference/Operators/Subtraction">L'opérateur de soustraction</a></li>
+</ul>