What is ArrayBuffer in JavaScript?

Posted by Editorial Staff | Updated on

Question: What is ArrayBuffer in JavaScript?

Answer: The ArrayBuffer is a data type that is used to represent a generic, fixed-length binary data buffer. The ArrayBuffer object is used to represent a generic, fixed-length raw binary data buffer.

You cannot directly manipulate the contents of an ArrayBuffer; instead, you create one of the typed array objects or a DataView object which represents the buffer in a specific format, and use that to read and write the contents of the buffer.

JavaScript Example: ArrayBuffer Constructor

Output

Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers