The Javascript DataView getInt32() method gets a signed 32-bit integer at the specified byte offset from the DataView.
dataview.getInt32(byteOffset [, littleEndian])
byteOffset
- the offset, in bytes, from the start of the view.littleEndian
- Optional, boolean value. If false or undefined, a big-endian value is read. Otherwise use the little endian.Using the getInt32 method
var buffer = new ArrayBuffer(8); var dataview = new DataView(buffer); let a = dataview.getInt32(1); console.log(a);// 0