// create an ArrayBuffer with a size in bytes
const buffer = new ArrayBuffer(8);

// use byteLength to check the size
const bytes = buffer.byteLength;

console.log(bytes);
// expected output: 8