Javascript Uint32Array byteOffset

Introduction

The Javascript Uint32Array byteOffset property returns the offset in bytes of a typed array from the start of its ArrayBuffer.

Uint32Array.byteOffset

The Javascript Uint32Array byteOffset property is a read only property.

The value is set when a Uint32Array is created and cannot be changed.

Using the Javascript Uint32Array byteOffset property

var buffer = new ArrayBuffer(8);

var uint8 = new Uint32Array(buffer);
console.log(uint8.byteOffset); // 0 (no offset specified)

var uint8 = new Uint32Array(buffer, 3);
console.log(uint8.byteOffset); // 3 (as specified when constructing Uint32Array)



PreviousNext

Related