From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../functions/arguments/@@iterator/index.html | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 files/ja/web/javascript/reference/functions/arguments/@@iterator/index.html (limited to 'files/ja/web/javascript/reference/functions/arguments/@@iterator/index.html') diff --git a/files/ja/web/javascript/reference/functions/arguments/@@iterator/index.html b/files/ja/web/javascript/reference/functions/arguments/@@iterator/index.html new file mode 100644 index 0000000000..e0690a49af --- /dev/null +++ b/files/ja/web/javascript/reference/functions/arguments/@@iterator/index.html @@ -0,0 +1,63 @@ +--- +title: 'arguments[@@iterator]()' +slug: Web/JavaScript/Reference/Functions/arguments/@@iterator +tags: + - Functions + - JavaScript + - Property + - arguments +translation_of: Web/JavaScript/Reference/Functions/arguments/@@iterator +--- +
{{jsSidebar("Functions")}}
+ +

@@iterator プロパティの初期値は {{jsxref("Array.prototype.values")}} プロパティの初期値と同じ関数オブジェクトです。

+ +

構文

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

+ +

for...of ループを用いた反復

+ +
function f() {
+  // your browser must support for..of loop
+  // and let-scoped variables in for loops
+  for (let letter of arguments) {
+    console.log(letter);
+  }
+}
+f('w', 'y', 'k', 'o', 'p');
+
+ +

仕様書

+ + + + + + + + + + + + + + + +
仕様書
{{SpecName('ESDraft', '#sec-createunmappedargumentsobject', 'CreateUnmappedArgumentsObject')}}
{{SpecName('ESDraft', '#sec-createmappedargumentsobject', 'CreateMappedArgumentsObject')}}
+ +

ブラウザーの互換性

+ +
+ + +

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

+
+ +

関連情報

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