// create an ArrayBuffer with a size in bytes
var buffer = new ArrayBuffer(16);

var view = new DataView(buffer);
view.setInt32(1, 2147483647); // (max signed 32-bit integer)

console.log(view.getInt32(1));
// expected output: 2147483647