In class-based languages, a new instance is constructed through a class's constructor function, a special function that reserves a block of memory for the object's members (properties and methods) and returns a reference to that block. An optional set of constructor arguments can be passed to the function and are usually held in properties. The resulting instance will inherit all the methods and properties that were defined in the class, which acts as a kind of template from which similarly typed objects can be constructed.
Classless-based languages differ in regards to how they create groups of objects with shared behaviors. Moreover, one can distinguish the differences between the concepts in the following four key areas of divergence: 1) object creation, 2) hierarchical structures, 3) how objects share behavior amongst one another and 4) the creation or deletion of an object’s properties. We don’t have classes inheriting from other classes; rather objects inherit directly from other objects. We can start with a generalized object, which is a working object instance. It can also be possible to assign methods to objects.