A - your constructor, this means that you have added to this function everything you need to execute on the newly created object when you "initialize" it
in your case you are not doing anything. the constructor has a prototype property, which is an object that the entire object that you create with new A(), inherits from
unless you explicitly set a prototype for your constructor, so your default prototype is empty.
: const c = new A(); c
:
A.prototype.sex = "girl";
"girl"
( ), , "". , c - , :
A.prototype={
name:"q",
age:12
};
A, A.prototype, . , ,
{
name:"q",
age:12
}
. c - ( ) .
: const d = new A(), d.name , d.sex
, ( A.prototype), A.prototype, , "instanciated" .