Standard built-ins

DataView.prototype.getBigInt64()

Try the free JavaScript compiler

Reads a signed 64-bit BigInt at an arbitrary byte offset. The entire value must fit in the view; otherwise a RangeError is thrown.

Formal Syntax & Structure

javascript syntaxjavascript
view.getBigInt64(byteOffset, littleEndian?)

Parameters & Attributes

NameTypeDescription
byteOffsetnumberStarting byte offset within the view.
littleEndianbooleanTrue for little-endian; omitted or false means big-endian.

Return Value

bigint

Decoded value.

Working Example

Example Snippetjavascript
const view=new DataView(new ArrayBuffer(9)); view.setBigInt64(1,-9007199254740993n,true); console.log(String(view.getBigInt64(1,true)));
JavaScript Reference