BigUint64Array
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ìâ©.
Uint16Array íìí ë°°ì´(TypedArray)ì íë«í¼ì ë°ì´í¸ ìì를 ë°ë¥´ë 64ë¹í¸ ë¶í¸ ìë ì ìì ë°°ì´ì
ëë¤.
ë°ì´í¸ ìì를 ì ì´í´ì¼ íë ê²½ì° DataView를 ëì ì¬ì©í©ëë¤. ë°°ì´ì ë´ì©ì 0nì¼ë¡ ì´ê¸°íë©ëë¤.
ë°°ì´ì´ ìì±ëë©´ ê°ì²´ì ë©ìë를 ì¬ì©íê±°ë íì¤ ë°°ì´ ì¸ë±ì¤ 구문(ì¦, ëê´í¸ íê¸°ë² ì¬ì©)ì ì¬ì©íì¬ ë°°ì´ì ìì를 참조í ì ììµëë¤.
ìì±ì
BigUint64Array()-
ìë¡ì´
BigUint64Arrayê°ì²´ë¥¼ ìì±í©ëë¤.
ì ì ìì±
ë¶ëª¨ TypedArrayìì ì ì ìì±ì ììí©ëë¤.
BigUint64Array.BYTES_PER_ELEMENT-
ìì í¬ê¸°ë¥¼ ì«ì ê°ì¼ë¡ ë°íí©ëë¤.
BigUint64Arrayì ê²½ì°8ì ëë¤. BigUint64Array.name-
ìì±ì ì´ë¦ì 문ìì´ë¡ ë°íí©ëë¤.
BigUint64Arrayíì ì ê²½ì°"BigUint64Array"ì ëë¤.
ì ì ë©ìë
ë¶ëª¨ TypedArrayìì ì ì ë©ìë를 ììí©ëë¤.
ì¸ì¤í´ì¤ ìì±
ë¶ëª¨ TypedArrayìì ì¸ì¤í´ì¤ ìì±ì ììí©ëë¤.
BigUint64Array.prototype.BYTES_PER_ELEMENT-
ìì í¬ê¸°ë¥¼ ì«ì ê°ì¼ë¡ ë°íí©ëë¤.
BigUint64Arrayì ê²½ì°8ì ëë¤.
ì¸ì¤í´ì¤ ë©ìë
ë¶ëª¨ TypedArrayìì ì¸ì¤í´ì¤ ë©ìë를 ììí©ëë¤.
ìì
>BigUint64Array를 ìì±í기 ìí ê°ê¸° ë¤ë¥¸ ì¬ë¬ ë°©ë²
// 길ì´ë¡ë¶í° ìì±
const biguint64 = new BigUint64Array(2);
biguint64[0] = 42n;
console.log(biguint64[0]); // 42n
console.log(biguint64.length); // 2
console.log(biguint64.BYTES_PER_ELEMENT); // 8
// ë°°ì´ë¡ë¶í° ìì±
const x = new BigUint64Array([21n, 31n]);
console.log(x[1]); // 31n
// ë¤ë¥¸ TypedArrayë¡ë¶í° ìì±
const y = new BigUint64Array(x);
console.log(y[0]); // 21n
// ArrayBufferë¡ë¶í° ìì±
const buffer = new ArrayBuffer(64);
const z = new BigUint64Array(buffer, 8, 4);
console.log(z.byteOffset); // 8
// ìíë¡ë¶í° ìì±
const iterable = (function* () {
yield* [1n, 2n, 3n];
})();
const biguint64FromIterable = new BigUint64Array(iterable);
console.log(biguint64FromIterable);
// BigUint64Array [1n, 2n, 3n]
ëª ì¸ì
| Specification |
|---|
| ECMAScript® 2026 Language Specification > # sec-typedarray-objects > |