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ì¼ë¡ ì´ê¸°íë©ëë¤. ë°°ì´ì´ ìì±ëë©´ ê°ì²´ì ë©ìë를 ì¬ì©íê±°ë íì¤ ë°°ì´ ì¸ë±ì¤ 구문(ì¦, ëê´í¸ íê¸°ë² ì¬ì©)ì
ì¬ì©íì¬ ë°°ì´ì ìì를 참조í ì ììµëë¤.
ìì±ì
BigInt64Array()-
ìë¡ì´
BigInt64Arrayê°ì²´ë¥¼ ìì±í©ëë¤.
ì ì ìì±
ë¶ëª¨ TypedArrayìì ì ì ìì±ì ììí©ëë¤.
BigInt64Array.BYTES_PER_ELEMENT-
ìì í¬ê¸°ë¥¼ ì«ìë¡ ë°íí©ëë¤.
BigInt64Arrayì ê²½ì°8ì ëë¤. BigInt64Array.name-
BigInt64Arrayíì ì ê²½ì°"BigInt64Array"ì ëë¤.
ì ì ë©ìë
ë¶ëª¨ TypedArrayìì ì ì ë©ìë를 ììí©ëë¤.
ì¸ì¤í´ì¤ ìì±
ë¶ëª¨ TypedArrayìì ì¸ì¤í´ì¤ ìì±ì ììí©ëë¤.
BigInt64Array.prototype.BYTES_PER_ELEMENT-
ìì í¬ê¸°ë¥¼ ì«ìë¡ ë°íí©ëë¤.
BigInt64Arrayì ê²½ì°8ì ëë¤.
ì¸ì¤í´ì¤ ë©ìë
ë¶ëª¨ TypedArrayìì ì¸ì¤í´ì¤ ë©ìë를 ììí©ëë¤.
ìì
>BigInt64Arrayì ìì±í기 ìí ê°ê¸° ë¤ë¥¸ ë°©ë²
// 길ì´ë¡ë¶í°
const bigint64 = new BigInt64Array(2);
bigint64[0] = 42n;
console.log(bigint64[0]); // 42n
console.log(bigint64.length); // 2
console.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® 2027 Language Specification> # sec-typedarray-objects> |