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 2016ë 7ì.
@@iterator ìì±ì ì´ê¸°ê°ì Array.prototype.values ìì±ì ì´ê¸°ê°ê³¼ ê°ì í¨ì ê°ì²´ì
ëë¤.
구문
arguments[Symbol.iterator]()
ìì
>for...of ë°ë³µë¬¸ì ì¬ì©í ë°ë³µ
js
function f() {
// ë¸ë¼ì°ì ê° for...of ë°ë³µë¬¸ê³¼
// for ë°ë³µë¬¸ ìì let ë²ìì ë³ì를 ì§ìí´ì¼ í©ëë¤.
for (let letter of arguments) {
console.log(letter);
}
}
f("w", "y", "k", "o", "p");
ëª ì¸
| Specification |
|---|
| ECMAScript® 2027 Language Specification> # sec-createunmappedargumentsobject> |
| ECMAScript® 2027 Language Specification> # sec-createmappedargumentsobject> |