UNB/ CS/ David Bremner/ teaching/ cs2613/ books/ mdn/ Reference/ Global Objects/ DataView/ DataView.prototype.setBigUint64()

The setBigUint64() method of DataView instances takes a BigInt and stores it as a 64-bit unsigned integer in the 8 bytes starting at the specified byte offset of this DataView. There is no alignment constraint; multi-byte values may be stored at any offset within bounds.

Syntax

setBigUint64(byteOffset, value)
setBigUint64(byteOffset, value, littleEndian)

Parameters

Return value

undefined.

Exceptions

Examples

Using setBigUint64()

const buffer = new ArrayBuffer(10);
const dataview = new DataView(buffer);
dataview.setBigUint64(0, 3n);
dataview.getBigUint64(1); // 768n

Specifications

Browser compatibility

See also