Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

TypedArray.prototype.values()

values() 메서드는 배열 내 각 인덱스에 대한 값을 포함하는 새로운 Array Iterator 객체를 반환합니다.

구문

arr.values()

for...of 루프를 사용한 반복

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

대안 반복

var arr = new Uint8Array([10, 20, 30, 40, 50]);
var eArr = arr.values();
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.values()' in that specification.
Standard 초기 정의.
ECMAScript 2017 Draft (ECMA-262)
The definition of '%TypedArray%.prototype.values()' in that specification.
Draft  

브라우저 호환성

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) 37 (37) 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) 37.0 (37) No support No support No support

참조

문서 태그 및 공헌자

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