From 844f5103992238c0c23203286dad16a466e89c97 Mon Sep 17 00:00:00 2001 From: julieng Date: Tue, 3 Aug 2021 08:03:09 +0200 Subject: move *.html to *.md --- .../global_objects/function/arguments/index.html | 90 ---------------------- 1 file changed, 90 deletions(-) delete mode 100644 files/fr/web/javascript/reference/global_objects/function/arguments/index.html (limited to 'files/fr/web/javascript/reference/global_objects/function/arguments/index.html') 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 ---- -
{{JSRef}} {{Deprecated_header}}
- -

La propriété function.arguments 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 l'optimisation de la queue des appels (tail call optimization).

- -

Description

- -

La syntaxe function.arguments 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")}}.

- -

Si on utilise la récursivité (autrement dit si une fonction f apparaît plusieurs fois dans la pile d'appels ou encore qu'une fonction f s'appelle elle-même), la valeur de f.arguments représentera les arguments correspondant à l'appel le plus « récent » de la fonction.

- -

La valeur de la propriété arguments est normalement null 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).

- -

Exemples

- -
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
-
- -

Spécifications

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SpécificationStatutCommentaires
{{SpecName('ES1')}}{{Spec2('ES1')}}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.
{{SpecName('ES5.1', '#sec-10.6', 'arguments object')}}{{Spec2('ES5.1')}}Objet {{jsxref("Fonctions/arguments", "arguments")}}
{{SpecName('ES6', '#sec-arguments-object', 'arguments object')}}{{Spec2('ES6')}}Objet {{jsxref("Fonctions/arguments", "arguments")}}
{{SpecName('ESDraft', '#sec-arguments-object', 'arguments object')}}{{Spec2('ESDraft')}}Objet {{jsxref("Fonctions/arguments", "arguments")}}
- -

Compatibilité des navigateurs

- -

{{Compat("javascript.builtins.Function.arguments")}}

- -

Voir aussi

- - -- cgit v1.2.3-54-g00ecf