diff options
author | julieng <julien.gattelier@gmail.com> | 2021-08-03 08:03:09 +0200 |
---|---|---|
committer | SphinxKnight <SphinxKnight@users.noreply.github.com> | 2021-09-03 08:08:25 +0200 |
commit | 844f5103992238c0c23203286dad16a466e89c97 (patch) | |
tree | d537708951bb2b61be8192ffacc05a0ce6804f89 /files/fr/web/javascript/reference/operators/addition_assignment/index.html | |
parent | a70fd5b73ecb10bec3906640023e2a1a46e118a2 (diff) | |
download | translated-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/addition_assignment/index.html')
-rw-r--r-- | files/fr/web/javascript/reference/operators/addition_assignment/index.html | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/files/fr/web/javascript/reference/operators/addition_assignment/index.html b/files/fr/web/javascript/reference/operators/addition_assignment/index.html deleted file mode 100644 index c0a2136c3d..0000000000 --- a/files/fr/web/javascript/reference/operators/addition_assignment/index.html +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: Affectation après addition (+=) -slug: Web/JavaScript/Reference/Operators/Addition_assignment -tags: -- Assignment operator -- JavaScript -- Language feature -- Operator -- Reference -translation-of: Web/JavaScript/Reference/Operators/Addition_assignment -browser-compat: javascript.operators.addition_assignment ---- -<div>{{jsSidebar("Operators")}}</div> - -<p>L'opérateur d'addition et d'affectation (<code>+=</code>) calcule la somme ou la concaténation de ses deux opérandes puis affecte le résultat à la variable représentée par l'opérande gauche. C'est le type des opérandes qui détermine s'il y a somme ou concaténation.</p> - -<div>{{EmbedInteractiveExample("pages/js/expressions-addition-assignment.html")}}</div> - -<h2 id="syntax">Syntax</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_addition_assignment">Utiliser l'opérateur d'addition et d'affectation</h3> - -<pre class="brush: js"> -let toto = "toto"; -let truc = 5; -let machin = true; - -// nombre + nombre -> addition -truc += 2; // 7 - -// booléen + nombre -> addition -machin += 1; // 2 - -// booléen + booléen -> addition -machin += false; // 1 - -// nombre + chaîne de caractères -> concaténation -truc += 'toto'; // "5toto" - -// chaîne de caractères + booléen -> concaténation -toto += false // "totofalse" - -// chaîne de caractères + chaîne de caractères -> concaténation -toto += 'truc' // "tototruc"</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/Addition">L'opérateur d'addition/concaténation</a></li> -</ul> |