Widely availableSupported across all major browsers. Safe to use in production.

Overview

The BigInt64Array and BigUint64Array typed arrays represent 64-bit integers, signed and unsigned respectively.

Browser support

Feature Desktop Mobile
Chrome
Edge
Firefox
Safari
Chrome Android
Safari iOS
67
79
68
15
67
15

The BigInt64Array() constructor creates BigInt64Array objects. The contents are initialized to 0n unless initialization data is explicitly provided.

67
79
68
15
67
15
Other

The BigUint64Array typed array represents an array of 64-bit unsigned integers in the platform byte order. If control over byte order is needed, use DataView instead. The contents are initialized to 0n unless initialization data is explicitly provided. Once established, you can reference elements in the array using the object's methods, or using standard…

67
79
68
15
67
15
Built-in object

The BigUint64Array() constructor creates BigUint64Array objects. The contents are initialized to 0n unless initialization data is explicitly provided.

67
79
68
15
67
15

The getBigInt64() method of DataView instances reads 8 bytes starting at the specified byte offset of this DataView and interprets them as a 64-bit signed integer. There is no alignment constraint; multi-byte values may be fetched from any offset within bounds.

67
79
68
15
67
15

The getBigUint64() method of DataView instances reads 8 bytes starting at the specified byte offset of this DataView and interprets them as a 64-bit unsigned integer. There is no alignment constraint; multi-byte values may be fetched from any offset within bounds.

67
79
68
15
67
15

The setBigInt64() method of DataView instances takes a BigInt and stores it as a 64-bit signed 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.

67
79
68
15
67
15

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.

67
79
68
15
67
15
1+Supported (version) Not supported Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)

Syntax

JAVASCRIPT
const arr = new BigInt64Array(3);
arr[0] = 9007199254740993n;
arr[1] = -42n;

console.log(arr); // BigInt64Array [9007199254740993n, -42n, 0n]

Live demo

BigInt64Array Basics

64talignnumber TypedArray.BigInt value.

PreviewFullscreen

Normal. Array and. Convert

BigInt array and. phaseconvert.

PreviewFullscreen

other. TypedArray and. comparison

BigInt64Array and Int32Array. range. Difference.

PreviewFullscreen

Use cases

  • Using BigInt64Array

    The BigInt64Array and BigUint64Array typed arrays represent 64-bit integers, signed and unsigned respectively.

Cautions

  • No specific concerns. Stable across all major browsers.

Accessibility

  • When updating the DOM dynamically, announce important changes to assistive technology with aria-live regions.

Powered by web-features