Standard built-ins

TypedArray.prototype.byteOffset

Try the free JavaScript compiler

Starting byte offset of the typed view within its backing buffer. An out-of-bounds or detached view reports zero.

Formal Syntax & Structure

javascript syntaxjavascript
view.byteOffset

Return Value

number

Offset in bytes.

Working Example

Example Snippetjavascript
const a=new Uint16Array(new ArrayBuffer(8),2,2); console.log(a.byteOffset);
JavaScript Reference