Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardJavaScripttyped arrays and ArrayBufferSingle-choice MCQ

When you write new Int8Array(buffer, byteOffset, length), what constraint does the spec place on byteOffset, and what happens if it is violated?

const buf = new ArrayBuffer(16); // Int8Array element size = 1; Float64Array element size = 8 const v = new Float64Array(buf, 4, 1);