Javascript constructor Loads the object as soon as the constructor is created. This process is called automatic object initialization. A constructor is a special method that allows an object to initialize itself when it is created.
JavaScript Constructor Function
It Perform automatic object initialization. A constructor has the same name as the class name.A constructor returns an instance of the class itself. So either it doesn’t return anything, or it doesn’t specify a return type, nor does it specify void.
Syntax: