I'm experimenting with the Google closure library and in particluar its 'inherits' method.
I have one question. When I extend a base class, if I do not set the base class's properties in its constructor, all the children end up sharing the properties, for example, if I add items to an array the array just keeps getting bigger.
Could someone explain why I need to set the properties in the constructor?
Here's my example, if you comment out "this.list = [9,8,7];" in the 'Person' constructor, the children share the persons list and keep adding to it.
http://jsbin.com/imujoy/1/edit
Thanks for any help.