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.