Last Updated : 18 Apr, 2025
ArrayBuffer is used to represent a generic, fixed-length raw binary data buffer. The contents of an ArrayBuffer cannot be directly manipulated and can only be accessed through a DataView Object or one of the typed array objects. These Objects are used to read and write the contents of the buffer.
Syntax:
new ArrayBuffer(byteLen)
Parameters: It takes one parameter.
Return Type: It returns an ArrayBuffer object.
Example: This example creates an ArrayBuffer object
JavaScript
const buffer = new ArrayBuffer(8);
const view = new Int32Array(buffer);
console.log(view);
Int32Array(2) [ 0, 0 ]
The complete list of JavaScript ArrayBuffer is listed below:
JavaScript ArrayBuffer Constructor: In JavaScript, a constructor gets called when an object is created using the new keyword.
Constructor Description ArrayBuffer() Returns the ArrayBuffer objectJavaScript ArrayBuffer Properties: A JavaScript property is a member of an object that associates a key with a value.
JavaScript ArrayBuffer Methods: JavaScript methods are the actions that can be performed on objects. There are two types of Number methods in JavaScript.
Static Methods
Description
isView() It checks given an argument for the function is a typed array or not.RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4