prototypes for each type of object created. All objects inherit from the generic
Object prototype (this is similar to how all objects inherit from “Object” in java), and new object types also define their own object prototype.
It is best practice to place common object method definitions in the prototype, since definitions are shared between all instances of the object. If method definitions are defined in the object constructor, a new copy of the method definition is stored in memory for each constructed object (which is highly inefficient). Storing at the prototype level only defines the method once.
Object prototypes have access to any data fields defined for the object.