arguments[@@iterator]()
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
@@iterator
プロパティの初期値は Array.prototype.values
プロパティの初期値と同じ関数オブジェクトです。
構文
js
arguments[Symbol.iterator]();
例
for...of ループを用いた反復処理
js
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");
仕様書
Specification |
---|
ECMAScript Language Specification # sec-createunmappedargumentsobject |
ECMAScript Language Specification # sec-createmappedargumentsobject |
ブラウザーの互換性
BCD tables only load in the browser