--- title: DataView.prototype.setBigUint64() slug: Web/JavaScript/Reference/Global_Objects/DataView/setBigUint64 tags: - BigInt - DataView - setBigUint64 translation_of: Web/JavaScript/Reference/Global_Objects/DataView/setBigUint64 ---
setBigUint64()
方法在距DataView 的起始位置的指定字节偏移处存储一个无符号的64位整数(unsigned long long类型)值。
dataview.setBigUint64(byteOffset, value [, littleEndian])
2n ** 64n - 1n
(18446744073709551615n
)。当发生溢出时,将会变成0。{{jsxref("undefined")}}.
setBigUint64
方法var buffer = new ArrayBuffer(8); var dataview = new DataView(buffer); dataview.setBigUint64(0, 3n); dataview.getBigUint64(0); // 3n
规范 | 状态 | 解释 |
---|---|---|
{{SpecName('ESDraft', '#sec-dataview.prototype.setbiguint64', 'DataView.prototype.setBigUint64()')}} | {{Spec2('ESDraft')}} |
{{Compat("javascript.builtins.DataView.setBigUint64")}}