Joeyrodrigues92
2/1/2017 - 11:50 PM

Proto-Typed, Constructor

Prototype

how is the Constructor connected to the Prototype the Constructor has one prototype

Constructor -> create objects on the fly

var obj1 = new Constructor(...); var obj2 = new Constructor(,,,);

is the prototype of obj1 different than the prototype of obj2?

it's the same

because we're using the same constructor

if I edit the protoype of a constructor, do all of my objects have it?

Yes, because there's only one to rule them all

objects created with a constructor have a property called proto that points to the prototype of the constructor that was used to create that object