aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/javascript/reference/global_objects/math/pow
diff options
context:
space:
mode:
authorjulieng <julien.gattelier@gmail.com>2021-08-03 08:03:23 +0200
committerSphinxKnight <SphinxKnight@users.noreply.github.com>2021-09-03 08:08:25 +0200
commitbf8e099b9c8b3c60d60b3712b4fc97b052c39887 (patch)
treec101746d082c9581c94f5937519c7d0e2f4af8cb /files/fr/web/javascript/reference/global_objects/math/pow
parent844f5103992238c0c23203286dad16a466e89c97 (diff)
downloadtranslated-content-bf8e099b9c8b3c60d60b3712b4fc97b052c39887.tar.gz
translated-content-bf8e099b9c8b3c60d60b3712b4fc97b052c39887.tar.bz2
translated-content-bf8e099b9c8b3c60d60b3712b4fc97b052c39887.zip
convert content to md
Diffstat (limited to 'files/fr/web/javascript/reference/global_objects/math/pow')
-rw-r--r--files/fr/web/javascript/reference/global_objects/math/pow/index.md106
1 files changed, 40 insertions, 66 deletions
diff --git a/files/fr/web/javascript/reference/global_objects/math/pow/index.md b/files/fr/web/javascript/reference/global_objects/math/pow/index.md
index b12f348e80..e85580ec3d 100644
--- a/files/fr/web/javascript/reference/global_objects/math/pow/index.md
+++ b/files/fr/web/javascript/reference/global_objects/math/pow/index.md
@@ -9,38 +9,37 @@ tags:
translation_of: Web/JavaScript/Reference/Global_Objects/Math/pow
original_slug: Web/JavaScript/Reference/Objets_globaux/Math/pow
---
-<div>{{JSRef}}</div>
+{{JSRef}}
-<p>La fonction <code><strong>Math.pow()</strong></code> renvoie un nombre à une certaine puissance, c'est-à-dire <code>base^exposant</code>.</p>
+La fonction **`Math.pow()`** renvoie un nombre à une certaine puissance, c'est-à-dire `base^exposant`.
-<div>{{EmbedInteractiveExample("pages/js/math-pow.html")}}</div>
+{{EmbedInteractiveExample("pages/js/math-pow.html")}}
-<h2 id="Syntaxe">Syntaxe</h2>
+## Syntaxe
-<pre class="syntaxbox">Math.pow(<var>base</var>, <var>exposant</var>);</pre>
+ Math.pow(base, exposant);
-<h3 id="Paramètres">Paramètres</h3>
+### Paramètres
-<dl>
- <dt><code>base</code></dt>
- <dd>Le nombre correspondant à la base.</dd>
- <dt><code>exponent</code></dt>
- <dd>L'exposant auquel on élève le paramètre précédent.</dd>
-</dl>
+- `base`
+ - : Le nombre correspondant à la base.
+- `exponent`
+ - : L'exposant auquel on élève le paramètre précédent.
-<h3 id="Valeur_de_retour">Valeur de retour</h3>
+### Valeur de retour
-<p>Un nombre qui représente un nombre (premier argument) élevé à une puissance donné (second argument).</p>
+Un nombre qui représente un nombre (premier argument) élevé à une puissance donné (second argument).
-<h2 id="Description">Description</h2>
+## Description
-<p><code>pow()</code> est une méthode statique de <code>Math</code> et doit toujours être utilisée avec la syntaxe <code>Math.pow()</code>, elle ne doit pas être utilisée comme une méthode d'un autre objet qui aurait été créé (<code>Math</code> n'est pas un constructeur).</p>
+`pow()` est une méthode statique de `Math` et doit toujours être utilisée avec la syntaxe `Math.pow()`, elle ne doit pas être utilisée comme une méthode d'un autre objet qui aurait été créé (`Math` n'est pas un constructeur).
-<h2 id="Exemple">Exemple</h2>
+## Exemple
-<h3 id="Utiliser_Math.pow()">Utiliser <code>Math.pow()</code></h3>
+### Utiliser `Math.pow()`
-<pre class="brush:js">// Utilisation simple
+```js
+// Utilisation simple
Math.pow(7, 2); // 49
// Exposants négatifs
@@ -54,50 +53,25 @@ Math.pow(-7, 0.5); // NaN
// (les nombres négatifs n'ont pas de racine carrée)
Math.pow(-7, 1/3); // NaN
// Nombre négatif avec une base décimale
-</pre>
-
-<h2 id="Spécifications">Spécifications</h2>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">Spécification</th>
- <th scope="col">État</th>
- <th scope="col">Commentaires</th>
- </tr>
- <tr>
- <td>{{SpecName('ES1')}}</td>
- <td>{{Spec2('ES1')}}</td>
- <td>Définition initiale. Implémentée avec JavaScript 1.0.</td>
- </tr>
- <tr>
- <td>{{SpecName('ES5.1', '#sec-15.8.2.13', 'Math.pow')}}</td>
- <td>{{Spec2('ES5.1')}}</td>
- <td></td>
- </tr>
- <tr>
- <td>{{SpecName('ES6', '#sec-math.pow', 'Math.pow')}}</td>
- <td>{{Spec2('ES6')}}</td>
- <td></td>
- </tr>
- <tr>
- <td>{{SpecName('ESDraft', '#sec-math.pow', 'Math.pow')}}</td>
- <td>{{Spec2('ESDraft')}}</td>
- <td></td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2>
-
-<p>{{Compat("javascript.builtins.Math.pow")}}</p>
-
-<h2 id="Voir_aussi">Voir aussi</h2>
-
-<ul>
- <li>{{jsxref("Math.cbrt()")}}</li>
- <li>{{jsxref("Math.exp()")}}</li>
- <li>{{jsxref("Math.log()")}}</li>
- <li>{{jsxref("Math.sqrt()")}}</li>
- <li><a href="/fr/docs/Web/JavaScript/Reference/Opérateurs/Opérateurs_arithmétiques#Exponentiation_(**)">Opérateur d'exponentiation</a> {{experimental_inline}}</li>
-</ul>
+```
+
+## Spécifications
+
+| Spécification | État | Commentaires |
+| -------------------------------------------------------------------- | ---------------------------- | ----------------------------------------------------- |
+| {{SpecName('ES1')}} | {{Spec2('ES1')}} | Définition initiale. Implémentée avec JavaScript 1.0. |
+| {{SpecName('ES5.1', '#sec-15.8.2.13', 'Math.pow')}} | {{Spec2('ES5.1')}} | |
+| {{SpecName('ES6', '#sec-math.pow', 'Math.pow')}} | {{Spec2('ES6')}} | |
+| {{SpecName('ESDraft', '#sec-math.pow', 'Math.pow')}} | {{Spec2('ESDraft')}} | |
+
+## Compatibilité des navigateurs
+
+{{Compat("javascript.builtins.Math.pow")}}
+
+## Voir aussi
+
+- {{jsxref("Math.cbrt()")}}
+- {{jsxref("Math.exp()")}}
+- {{jsxref("Math.log()")}}
+- {{jsxref("Math.sqrt()")}}
+- [Opérateur d'exponentiation](</fr/docs/Web/JavaScript/Reference/Opérateurs/Opérateurs_arithmétiques#Exponentiation_(**)>) {{experimental_inline}}