--- title: ArrayBuffer.prototype.byteLength slug: Web/JavaScript/Reference/Global_Objects/ArrayBuffer/byteLength tags: - ArrayBuffer - JavaScript - Property - Prototype - Reference translation_of: Web/JavaScript/Reference/Global_Objects/ArrayBuffer/byteLength ---
byteLength
접근자 속성은 {{jsxref("ArrayBuffer")}}의 길이를 바이트 단위로 반환합니다.
arraybuffer.byteLength
byteLength
속성은 설정자 속성이 undefined
인 접근자 속성으로, 오직 읽기만 가능합니다. byteLength
는 배열 버퍼를 처음 생성할 때 정해지며 바꿀 수 없습니다. ArrayBuffer
가 분리된 경우 0을 반환합니다.
var buffer = new ArrayBuffer(8); buffer.byteLength; // 8
Specification |
---|
{{SpecName('ESDraft', '#sec-get-arraybuffer.prototype.bytelength', 'ArrayBuffer.prototype.byteLength')}} |
{{Compat("javascript.builtins.ArrayBuffer.byteLength")}}