Person.prototype = personPrototype;
Person.prototype.constructor = Person;
I don’t understand these 2 lines of this code.
I understand constructor functions need prototypes so that in this case, every person will have greet() or eat() etc. One master object to rule them all, that makes sense.
What I don’t get is why the prototype needs a constructor, isn’t that what Person() is?