|
|
|
|
|
by colbyAFTrustedK
3703 days ago
|
|
Is there a meaningful ? I.e., what does classical inheritance get you that prototypes-under-the-hood don't? For a programmer using classes, that ES's are implemented using prototypes should be as important has how the JVM works. |
|
Prototypical "inheritance" allows different types of values to be assigned to the same symbol.
E.g. if you have a method bob() on a prototype, you can set object.bob = 'astring'; and it isn't an error.