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/global_objects/function/arguments/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/global_objects/function/arguments/index.html')
-rw-r--r-- | files/fr/web/javascript/reference/global_objects/function/arguments/index.html | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/files/fr/web/javascript/reference/global_objects/function/arguments/index.html b/files/fr/web/javascript/reference/global_objects/function/arguments/index.html deleted file mode 100644 index 6723204679..0000000000 --- a/files/fr/web/javascript/reference/global_objects/function/arguments/index.html +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: Function.arguments -slug: Web/JavaScript/Reference/Global_Objects/Function/arguments -tags: - - Déprécié - - Function - - JavaScript - - Propriété - - Reference - - arguments -translation_of: Web/JavaScript/Reference/Global_Objects/Function/arguments -original_slug: Web/JavaScript/Reference/Objets_globaux/Function/arguments ---- -<div>{{JSRef}} {{Deprecated_header}}</div> - -<p>La propriété <code><strong>function.arguments</strong></code> fait référence à un objet dont la structure est semblable à celle d'un tableau dont les éléments correspondent aux arguments passés à une fonction. En lieu et place, il faut désormais utiliser {{jsxref("Fonctions/arguments", "arguments")}}. Cette propriété est interdite en mode stricte à cause de <a href="https://www.ecma-international.org/ecma-262/6.0/#sec-addrestrictedfunctionproperties">l'optimisation de la queue des appels (<em>tail call optimization</em>)</a>.</p> - -<h2 id="Description">Description</h2> - -<p>La syntaxe <code><em>function</em>.arguments</code> est obsolète. La méthode recommandée pour accéder à l'objet {{jsxref("Fonctions/arguments", "arguments")}} disponible au sein des fonctions est simplement de faire référence à la variable {{jsxref("Fonctions/arguments", "arguments")}}.</p> - -<p>Si on utilise la récursivité (autrement dit si une fonction <code>f</code> apparaît plusieurs fois dans la pile d'appels ou encore qu'une fonction <code>f</code> s'appelle elle-même), la valeur de <code>f.arguments</code> représentera les arguments correspondant à l'appel le plus « récent » de la fonction.</p> - -<p>La valeur de la propriété <code>arguments</code> est normalement <code>null</code> si la fonction n'est pas « en cours » (au sens où elle aurait été appelée et qu'elle n'ait pas fini son exécution).</p> - -<h2 id="Exemples">Exemples</h2> - -<pre class="brush:js">function f(n) { g(n-1); } - -function g(n) { - console.log("avant : " + g.arguments[0]); - if(n>0) f(n); - console.log("après : " + g.arguments[0]); -} - -f(2); - -console.log("fonction terminée : " + g.arguments); - -// On aura l'affichage de : - -// avant : 1 -// avant : 0 -// après : 0 -// après : 1 -// fonction terminée : null -</pre> - -<h2 id="Spécifications">Spécifications</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Spécification</th> - <th scope="col">Statut</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. Dépréciée pour être remplacée par {{jsxref("Fonctions/arguments", "arguments")}} décrit par ES3.</td> - </tr> - <tr> - <td>{{SpecName('ES5.1', '#sec-10.6', 'arguments object')}}</td> - <td>{{Spec2('ES5.1')}}</td> - <td>Objet {{jsxref("Fonctions/arguments", "arguments")}}</td> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-arguments-object', 'arguments object')}}</td> - <td>{{Spec2('ES6')}}</td> - <td>Objet {{jsxref("Fonctions/arguments", "arguments")}}</td> - </tr> - <tr> - <td>{{SpecName('ESDraft', '#sec-arguments-object', 'arguments object')}}</td> - <td>{{Spec2('ESDraft')}}</td> - <td>Objet {{jsxref("Fonctions/arguments", "arguments")}}</td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> - -<p>{{Compat("javascript.builtins.Function.arguments")}}</p> - -<h2 id="Voir_aussi">Voir aussi</h2> - -<ul> - <li>L'objet {{jsxref("Fonctions/arguments", "arguments")}}</li> - <li>{{jsxref("Fonctions", "Les fonctions et les portées de fonctions", "", 1)}}</li> -</ul> |