From 39f2114f9797eb51994966c6bb8ff1814c9a4da8 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 12:36:08 +0100 Subject: unslug fr: move --- .../functions/arguments/@@iterator/index.html | 78 ++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 files/fr/web/javascript/reference/functions/arguments/@@iterator/index.html (limited to 'files/fr/web/javascript/reference/functions/arguments/@@iterator') diff --git a/files/fr/web/javascript/reference/functions/arguments/@@iterator/index.html b/files/fr/web/javascript/reference/functions/arguments/@@iterator/index.html new file mode 100644 index 0000000000..d9cd086019 --- /dev/null +++ b/files/fr/web/javascript/reference/functions/arguments/@@iterator/index.html @@ -0,0 +1,78 @@ +--- +title: 'arguments[@@iterator]()' +slug: Web/JavaScript/Reference/Fonctions/arguments/@@iterator +tags: + - Déprécié + - Fonctions + - JavaScript + - Propriété + - Reference + - arguments +translation_of: Web/JavaScript/Reference/Functions/arguments/@@iterator +--- +
{{jsSidebar("Functions")}}
+ +

La valeur initiale de la propriété @@iterator est le même objet que la fonction utilisée pour la valeur initiale de la propriété {{jsxref("Array.prototype.values")}}.

+ +

Syntaxe

+ +
arguments[Symbol.iterator]()
+ +

Exemples

+ +

Utiliser une boucle for...of

+ +
function f() {
+  // votre environnement doit supporter les
+  // boucles for..of et les variables
+  // définies avec let dans les boucles
+  for (let letter of arguments) {
+    console.log(letter);
+  }
+}
+f('w', 'y', 'k', 'o', 'p');
+
+ +

Spécifications

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SpécificationStatutCommentaires
{{SpecName('ES6', '#sec-createunmappedargumentsobject', ' CreateUnmappedArgumentsObject')}}{{Spec2('ES6')}}Définition initiale.
{{SpecName('ES6', '#sec-createmappedargumentsobject', ' CreateMappedArgumentsObject')}}{{Spec2('ES6')}}Définition initiale.
{{SpecName('ESDraft', '#sec-createunmappedargumentsobject', 'CreateUnmappedArgumentsObject')}}{{Spec2('ESDraft')}} 
{{SpecName('ESDraft', '#sec-createmappedargumentsobject', 'CreateMappedArgumentsObject')}}{{Spec2('ESDraft')}} 
+ +

Compatibilité des navigateurs

+ + + +

{{Compat("javascript.functions.arguments.@@iterator")}}

+ +

Voir aussi

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