A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/javascript-arraybuffer-constructor-property/ below:

JavaScript ArrayBuffer constructor Property - GeeksforGeeks

JavaScript ArrayBuffer constructor Property

Last Updated : 26 May, 2023

JavaScript ArrayBuffer constructor property is used to return the ArrayBuffer constructor function for the object. The function returned by this property is just the reference, not the actual ArrayBuffer. It is an object property of JavaScript and can be used with Strings, Numbers, etc.

Syntax:

arraybuffer.constructor

Return Value: ArrayBuffer() { [native code] }

The below examples will illustrate the ArrayBuffer Constructor Property:

Example 1: In this example, we will see the basic use of ArrayBuffer Constructor Property in JavaScript.

JavaScript
function fun(){
    let x = new ArrayBuffer();
    console.log(x.constructor)
}
fun();

Output:

ƒ ArrayBuffer() { [native code] }

Example 2: In this example, we will use this property to print on the browser window

JavaScript
function myGeeks() {
    let looseSet = new ArrayBuffer();

    console.log(looseSet.constructor);
}
myGeeks();

Output
[Function: ArrayBuffer]

Supported Browsers:

We have a complete list of ArrayBuffer methods and properties, to check Please go through the ArrayBuffer Reference article.



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