| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/DataView/setInt32 | [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 2015 ..
setInt32() DataView 32- 4 DataView . , .
// Create an ArrayBuffer with a size in bytes
const buffer = new ArrayBuffer(16);
const view = new DataView(buffer);
view.setInt32(1, 2147483647); // Max signed 32-bit integer
console.log(view.getInt32(1));
// Expected output: 2147483647
setInt32(byteOffset, value)
setInt32(byteOffset, value, littleEndian)
byteOffset DataView, .
value. .
littleEndian , ("big-endian" "little-endian"). false undefined, ("big-endian").
RangeError, byteOffset DataView.
const buffer = new ArrayBuffer(10);
const dataview = new DataView(buffer);
dataview.setInt32(0, 3);
dataview.getInt32(1); // 768
| Specification |
|---|
| ECMAScript 2027 LanguageSpecification # sec-dataview.prototype.setint32 |
This page was last modified on 17 . 2025 . by MDN contributors.
DataViewgetBigInt64()getBigUint64()getFloat16()getFloat32()getFloat64()getInt8()getInt16()getInt32()getUint8()getUint16()getUint32()setBigInt64()setBigUint64()setFloat16()setFloat32()setFloat64()DataView.prototype.setInt8()DataView.prototype.setInt16()DataView.prototype.setInt32()setUint8()setUint16()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 |