Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
The behavior is the same, but they are not the same thing, in the first sample it's creating a function for each and every object created (waste of memory), while in the second it's adding the function to the prototype, thus one function is being 'shared' by every object.
I might be incorrect, but I believe these 2 are the same thing?
This comment is hidden because it contains spoiler information about the solution
I think you solved the exercise as intendid.
I was a bit consfused by this at first but after some exploring I think I get it now.
When you did
HumanSkin.prototype = new Cylon()
You created a property for all new HumanSkins called model. But since you never passed a model to
the new Cylon() you were inheriting from, model was left as undefined. Therefor you had to define a model of your own
within HumanSkin.
I hope that makes sense. Anybody, please correct me if I'm wrong.