Skip to content

Latest commit

 

History

History
18 lines (11 loc) · 613 Bytes

what_is_arraybuffer.md

File metadata and controls

18 lines (11 loc) · 613 Bytes

What is ArrayBuffer?

ArrayBuffer is a JavaScript object used to represent a generic, fixed-length raw binary data buffer. It is typically used when working with binary data, such as file processing, network requests, or Web APIs like WebSockets.

Example:

let buffer = new ArrayBuffer(16);  // 16 bytes buffer
let view = new Uint8Array(buffer);  // Typed array view
view[0] = 255;
console.log(view[0]);  // Output: 255

Tags: intermediate, JavaScript, Binary Data