| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/DataView/setBigInt64 | [Back] [Original] |
Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
This feature is well established and works across many devices and browser versions. Its been available across browsers since 2021 9.
DataView setBigInt64() BigInt
DataView 8 64 .
, .
// Create an ArrayBuffer with a size in bytes
const buffer = new ArrayBuffer(16);
// Highest possible BigInt value that fits in a signed 64-bit integer
const max = 2n ** (64n - 1n) - 1n;
const view = new DataView(buffer);
view.setBigInt64(1, max);
console.log(view.getBigInt64(1));
// Expected output: 9223372036854775807n
setBigInt64(byteOffset, value)
setBigInt64(byteOffset, value, littleEndian)
RangeError byteOffset .
const buffer = new ArrayBuffer(10);
const dataview = new DataView(buffer);
dataview.setBigInt64(0, 3n);
dataview.getBigInt64(1); // 768n
| Specification |
|---|
| ECMAScript 2027 LanguageSpecification # sec-dataview.prototype.setbigint64 |
This page was last modified on 2025 2 11 by MDN contributors.
DataViewDataView.prototype.getBigInt64()DataView.prototype.getBigUint64()DataView.prototype.getFloat16()DataView.prototype.getFloat32()DataView.prototype.getFloat64()DataView.prototype.getInt8()DataView.prototype.getInt16()DataView.prototype.getInt32()DataView.prototype.getUint8()DataView.prototype.getUint16()DataView.prototype.getUint32()DataView.prototype.setBigInt64()DataView.prototype.setBigUint64()DataView.prototype.setFloat16()DataView.prototype.setFloat32()DataView.prototype.setFloat64()DataView.prototype.setInt8()DataView.prototype.setInt16()DataView.prototype.setInt32()DataView.prototype.setUint8()DataView.prototype.setUint16()DataView.prototype.setUint32()Object/FunctionObject.prototype.__defineGetter__()Object.prototype.__defineSetter__()Object.prototype.__lookupGetter__()Object.prototype.__lookupSetter__()Object.prototype.hasOwnProperty()Object.prototype.isPrototypeOf()Object.prototype.propertyIsEnumerable()Object.prototype.toLocaleString()Object.prototype.toString()Object.prototype.valueOf()Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |