constructor function:
The so-called "constructor" is actually a normal function, but the this variable is used internally. Using the new operator on a constructor enables you to generate an instance, and the this variable is bound to the instance object.
(a normal function, unlike any other function, can be understood as a function = = constructor, which is just a conceptual definition used to instantiate an object.) )
For JavaScript built-in objects, object, Array, date, and so on are all constructors.
JavaScript specifies that each constructor has a prototype property that points to another object. All properties and methods of this object are inherited by an instance of the constructor.
This means that we can define the invariant properties and methods directly on the prototype object.
JavaScript Terminology Conceptual Constructors