Skip to content

Tag Archives: Constructors

In JavaScript, there are two ways to create a promise: using the Promise.resolve method or using the new Promise constructor. While both ways achieve the… Read More
This article focuses on function/method overloads by references, as well as the types of arguments that can be passed. Prerequisites: l-value references. r-value references. Move… Read More
Prerequisites: lvalue reference rvalue reference Copy Semantics (Copy Constructor) References: In C++ there are two types of references- lvalue reference: An lvalue is an expression… Read More
The export statement is used to bind one JavaScript module to others. In order to export the default constructor, we use an export statement and… Read More
In this article, we will discuss the problem of initialization in C++, the data members of a class have private scope by default, so they… Read More
The WeakMap() Constructor produces WeakMap objects that are a key/value pair array in which the key is referenced weakly. The keys should be objects and… Read More
In general, creating a copy of an object means to create an exact replica of the object having the same literal value, data type, and… Read More
In Object Oriented Programming, Objects are the instances of a class which has its own state(variables) and behavior(methods).  Every class has two special methods related… Read More
Prerequisites: l-value and r-value references in C++, Copy Constructor in C++. What is a Move Constructor?   The copy constructors in C++ work with the… Read More
We use new and delete operators in C++ to dynamically allocate memory whereas malloc() and free() functions are also used for the same purpose in… Read More
The RegExp constructor in JavaScript is used to return the function that created the RegExp object’s prototype i.e. the construction function for an object. It… Read More
The JavaScript array prototype constructor is used to allow to add new methods and properties to the Array() object. If the method is constructed, then… Read More
The String constructor property in JavaScript is used to return the string constructor function for the object. The function which is returned by this property… Read More
The JavaScript Array constructor property is used to return the constructor function for an array object. It only returns the reference of the function and… Read More
class Test {     static int a;            static     {         a = 4;         System.out.println ("inside static block\n");         System.out.println ("a = " + a);     }            Test()… Read More

Start Your Coding Journey Now!