ArrayBuffer.prototype.byteLength
byteLength
접근자 속성은 ArrayBuffer
의 길이를 바이트 단위로 반환합니다.
시도해보기
구문
arraybuffer.byteLength
설명
byteLength
속성은 설정자 속성이 undefined
인 접근자 속성으로, 오직 읽기만 가능합니다. byteLength
는 배열 버퍼를 처음 생성할 때 정해지며 바꿀 수 없습니다. ArrayBuffer
가 분리된 경우 0을 반환합니다.
예제
var buffer = new ArrayBuffer(8);
buffer.byteLength; // 8
명세
Specification |
---|
ECMAScript Language Specification # sec-get-arraybuffer.prototype.bytelength |
브라우저 호환성
BCD tables only load in the browser