We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

@@iterator 속성의 초기값은 values 속성의 초기값과 같은 함수 객체입니다.



for...of 루프를 사용하는 반복

var arr = new Uint8Array([10, 20, 30, 40, 50]);
// 브라우저가 for..of 루프 및 for 루프에서
// let 스코프인 변수를 지원해야 합니다
for (let n of arr) {

대안 반복

var arr = new Uint8Array([10, 20, 30, 40, 50]);
var eArr = arr[Symbol.iterator]();
console.log(eArr.next().value); // 10
console.log(eArr.next().value); // 20
console.log(eArr.next().value); // 30
console.log(eArr.next().value); // 40
console.log(eArr.next().value); // 50


스펙 상태 설명
ECMAScript 2015 (6th Edition, ECMA-262)
The definition of '%TypedArray%.prototype[@@iterator]()' in that specification.
Standard 초기 정의.
ECMAScript Latest Draft (ECMA-262)
The definition of '%TypedArray%.prototype[@@iterator]()' in that specification.

브라우저 호환성

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) 36 (36) [1] No support No support No support
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support No support (Yes) 36.0 (36) [1] No support No support No support

[1] Gecko 17 (Firefox 17 / Thunderbird 17 / SeaMonkey 2.14)에서 Gecko 26 (Firefox 26 / Thunderbird 26 / SeaMonkey 2.23 / Firefox OS 1.2)까지는 iterator 속성이 쓰였고(bug 907077), Gecko 27에서 Gecko 35까지는 "@@iterator" placeholder가 사용됐습니다. Gecko 36 (Firefox 36 / Thunderbird 36 / SeaMonkey 2.33)에서는, @@iterator symbol이 구현됐습니다 (bug 918828).


문서 태그 및 공헌자

이 페이지의 공헌자: Netaras
최종 변경: Netaras,