Standard built-ins
ArrayBuffer.prototype.maxByteLength
Maximum size of a resizable buffer, or the current length of a fixed buffer. A detached buffer reports zero.
Formal Syntax & Structure
javascript syntaxjavascript
buffer.maxByteLengthReturn Value
number
Maximum byte capacity.
Working Example
Example Snippetjavascript
const b = new ArrayBuffer(2, {maxByteLength: 8}); b.resize(4); console.log(b.byteLength, b.maxByteLength);