GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing www.geeksforgeeks.org — JavaScript ArrayBuffer() Constructor - GeeksforGeeks JavaScript ArrayBuffer() ConstructorLast Updated : 11 Jul, 2025 JavaScript ArrayBuffer Constructor is used to create a new ArrayBuffer object. ArrayBuffer object is used to represent a generic, fixed-length raw binary data buffer. This object can only be created with the new keyword. If the object is created without the new keyword it will throw a TypeError Syntax: new ArrayBuffer(byteLength, opt) Parameters: It accepts two parameters where the second parameter is optional.
Return value: It returns a new ArrayBuffer object of the specified size and the content is initialized to 0. Example 1: This example creates ArrayBufferobject with different parameters.
Output: The ArrayBuffer which was created without specifying the max byte length has a default max byte length equal to its byte length specified during the creation of the object ArrayBuffer(8) ArrayBuffer(8) 24 8 Example 2: In this example, we will see the use of the Javascript ArrayBuffer() method.
Output: 76543210 76 76 Supported Browsers:
We have a complete list of ArrayBuffer methods and properties, to check Please go through the JavaScript ArrayBuffer Reference article. Comment Explore |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |