Quote:
Originally Posted by Old Pedant
I would assume because you want a Closure.
...
If you didn't do that, then Child would simply reference Parent, and all changes in Child would also be changes in Parent.
|
It's more about inheritance chaining.
It you didn't create a new blank object (using new) each time you ran klass(), you would only inherit from the last passed object's prototype.
this way, you can keep tacking on more property collections.
it's essentially an object property merge, though the props never merge; the just scoot down the chain...