diff options
| author | julieng <julien.gattelier@gmail.com> | 2021-08-03 08:03:23 +0200 |
|---|---|---|
| committer | SphinxKnight <SphinxKnight@users.noreply.github.com> | 2021-09-03 08:08:25 +0200 |
| commit | bf8e099b9c8b3c60d60b3712b4fc97b052c39887 (patch) | |
| tree | c101746d082c9581c94f5937519c7d0e2f4af8cb /files/fr/web/javascript/reference/global_objects/infinity | |
| parent | 844f5103992238c0c23203286dad16a466e89c97 (diff) | |
| download | translated-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/infinity')
| -rw-r--r-- | files/fr/web/javascript/reference/global_objects/infinity/index.md | 91 |
1 files changed, 34 insertions, 57 deletions
diff --git a/files/fr/web/javascript/reference/global_objects/infinity/index.md b/files/fr/web/javascript/reference/global_objects/infinity/index.md index 7188beb806..0be346bb70 100644 --- a/files/fr/web/javascript/reference/global_objects/infinity/index.md +++ b/files/fr/web/javascript/reference/global_objects/infinity/index.md @@ -7,74 +7,51 @@ tags: translation_of: Web/JavaScript/Reference/Global_Objects/Infinity original_slug: Web/JavaScript/Reference/Objets_globaux/Infinity --- -<div>{{jsSidebar("Objects")}}</div> +{{jsSidebar("Objects")}} -<p>La propriété globale <strong><code>Infinity</code></strong> est une valeur numérique représentant l'infini.</p> +La propriété globale **`Infinity`** est une valeur numérique représentant l'infini. -<p>{{js_property_attributes(0,0,0)}}</p> +{{js_property_attributes(0,0,0)}} -<div>{{EmbedInteractiveExample("pages/js/globalprops-infinity.html")}}</div> +{{EmbedInteractiveExample("pages/js/globalprops-infinity.html")}} -<h2 id="Syntaxe">Syntaxe</h2> +## Syntaxe -<pre class="syntaxbox">Infinity</pre> + Infinity -<h2 id="Description">Description</h2> +## Description -<p><code>Infinity</code> est une propriété de <em>l'objet global</em> , c'est-à-dire qu'elle est accessible globalement.</p> +`Infinity` est une propriété de _l'objet global_ , c'est-à-dire qu'elle est accessible globalement. -<p>La valeur initiale d'<code>Infinity</code> est {{jsxref("Number.POSITIVE_INFINITY")}}. La valeur <code>Infinity</code> (infinité positive) est une valeur plus grande que n'importe quel nombre. Cette valeur se comporte comme l'infini mathématique ; par exemple, tout ce qui est multiplié par <code>Infinity</code> vaut <code>Infinity</code>, et tout ce qui est divisé par <code>Infinity</code> vaut 0.</p> +La valeur initiale d'`Infinity` est {{jsxref("Number.POSITIVE_INFINITY")}}. La valeur `Infinity` (infinité positive) est une valeur plus grande que n'importe quel nombre. Cette valeur se comporte comme l'infini mathématique ; par exemple, tout ce qui est multiplié par `Infinity` vaut `Infinity`, et tout ce qui est divisé par `Infinity` vaut 0. -<p>D'après la spécification ECMAScript 5, <code>Infinity</code> est en lecture seule.</p> +D'après la spécification ECMAScript 5, `Infinity` est en lecture seule. -<h2 id="Exemples">Exemples</h2> +## Exemples -<pre class="brush: js">console.log(Infinity); // Infinity +```js +console.log(Infinity); // Infinity console.log(Infinity + 1); // Infinity console.log(Math.pow(10, 1000)); // Infinity console.log(Math.log(0)); // -Infinity -console.log(1 / Infinity); // 0</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.3</td> - </tr> - <tr> - <td>{{SpecName('ES5.1', '#sec-15.1.1.2', 'Infinity')}}</td> - <td>{{Spec2('ES5.1')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-value-properties-of-the-global-object-infinity', 'Infinity')}}</td> - <td>{{Spec2('ES6')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('ESDraft', '#sec-value-properties-of-the-global-object-infinity', 'Infinity')}}</td> - <td>{{Spec2('ESDraft')}}</td> - <td> </td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> - -<p>{{Compat("javascript.builtins.Infinity")}}</p> - -<h2 id="Voir_aussi">Voir aussi</h2> - -<ul> - <li>{{jsxref("Number.NEGATIVE_INFINITY")}}</li> - <li>{{jsxref("Number.POSITIVE_INFINITY")}}</li> - <li>{{jsxref("Number.isFinite")}}</li> -</ul> +console.log(1 / Infinity); // 0 +``` + +## Spécifications + +| Spécification | État | Commentaires | +| ------------------------------------------------------------------------------------------------------------------------ | ---------------------------- | ---------------------------------------------------- | +| {{SpecName('ES1')}} | {{Spec2('ES1')}} | Définition initiale. Implémentée avec JavaScript 1.3 | +| {{SpecName('ES5.1', '#sec-15.1.1.2', 'Infinity')}} | {{Spec2('ES5.1')}} | | +| {{SpecName('ES6', '#sec-value-properties-of-the-global-object-infinity', 'Infinity')}} | {{Spec2('ES6')}} | | +| {{SpecName('ESDraft', '#sec-value-properties-of-the-global-object-infinity', 'Infinity')}} | {{Spec2('ESDraft')}} | | + +## Compatibilité des navigateurs + +{{Compat("javascript.builtins.Infinity")}} + +## Voir aussi + +- {{jsxref("Number.NEGATIVE_INFINITY")}} +- {{jsxref("Number.POSITIVE_INFINITY")}} +- {{jsxref("Number.isFinite")}} |
