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 속성의 초기값과 같은 함수 객체입니다.

구문

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® 2025 Language Specification
# sec-createunmappedargumentsobject
ECMAScript® 2025 Language Specification
# sec-createmappedargumentsobject

브라우저 호환성

Report problems with this compatibility data on GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
Node.js
[Symbol.iterator]

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

같이 보기