This page was translated from English by the community.Learn more and join the MDN Web Docs community.
BigInt64Array
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2021년 9월.
BigInt64Array 형식화 배열(TypedArray)은 플랫폼의 바이트 순서를 따르는 2의 보수 64비트의부호있는 정수 배열입니다. 바이트 순서를 제어해야 하는 경우 대신DataView를 사용합니다.배열의 내용은0n으로 초기화됩니다. 배열이 생성되면 객체의 메서드를 사용하거나 표준 배열 인덱스 구문(즉, 대괄호 표기법 사용)을사용하여 배열의 요소를 참조할 수 있습니다.
In this article
생성자
BigInt64Array()새로운
BigInt64Array객체를 생성합니다.
정적 속성
부모TypedArray에서 정적 속성을 상속합니다.
BigInt64Array.BYTES_PER_ELEMENT요소 크기를 숫자로 반환합니다.
BigInt64Array의 경우8입니다.BigInt64Array.nameBigInt64Array타입의 경우"BigInt64Array"입니다.
정적 메서드
부모TypedArray에서 정적 메서드를 상속합니다.
인스턴스 속성
부모TypedArray에서 인스턴스 속성을 상속합니다.
BigInt64Array.prototype.BYTES_PER_ELEMENT요소 크기를 숫자로 반환합니다.
BigInt64Array의 경우8입니다.
인스턴스 메서드
부모TypedArray에서 인스턴스 메서드를 상속합니다.
예제
>BigInt64Array을 생성하기 위한 각기 다른 방법
js
// 길이로부터const bigint64 = new BigInt64Array(2);bigint64[0] = 42n;console.log(bigint64[0]); // 42nconsole.log(bigint64.length); // 2console.log(bigint64.BYTES_PER_ELEMENT); // 8// 배열로부터const x = new BigInt64Array([21n, 31n]);console.log(x[1]); // 31n// 다른 TypedArray로부터const y = new BigInt64Array(x);console.log(y[0]); // 21n// ArrayBuffer로부터const buffer = new ArrayBuffer(64);const z = new BigInt64Array(buffer, 8, 4);console.log(z.byteOffset); // 8// 순회로부터const iterable = (function* () { yield* [1n, 2n, 3n];})();const bigint64FromIterable = new BigInt64Array(iterable);console.log(bigint64FromIterable);// BigInt64Array [1n, 2n, 3n]명세
| Specification |
|---|
| ECMAScript® 2026 Language Specification> # sec-typedarray-objects> |