Standard built-ins
TypedArray.prototype.byteLength
Byte span of the typed view, not necessarily the size of its backing buffer.
Formal Syntax & Structure
javascript syntaxjavascript
view.byteLengthReturn Value
number
View size in bytes.
Working Example
Example Snippetjavascript
const a=new Uint16Array(new ArrayBuffer(8),2,2); console.log(a.byteLength,a.buffer.byteLength);