typedArray 객체의 keys() 함수는 항목과 유사하지만 유형이 지정된 배열의 인덱스를 포함하는 반복자 객체를 반환합니다.
구문
구문은 다음과 같습니다.
typedArray.keys()
예시
<html>
<head>
<title>JavaScript Array every Method</title>
</head>
<body>
<script type="text/javascript">
var int32View = new Int32Array([21, 64, 89, 65, 33, 66, 87, 55]);
document.write("Contents of the typed array: "+int32View);
document.write("<br>");
var it = int32View.keys();
for(i=0; i<int32View.length; i++) {
document.writeln(it.next().value);
}
</script>
</body>
</html> 출력
Contents of the typed array: 21,64,89,65,33,66,87,55 0 1 2 3 4 5 6 7