// create an ArrayBuffer with a size in bytes var buffer = new ArrayBuffer(8); console.log(buffer.byteLength); // expected output: 8