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.
Great! You can also use this idea to create proxy/decorator, immutable structures.
Cool. Actually
Object.defineProperty
is preferred in modern code, but anyway kudos for self-learning.With
bind
you don't need to declare additionalself
variable.Default function is cool. Not sure, why do you need to sort anything.
Thank you, Kirill. Indeed, it's much more elegant. I've saved it as well amoung my imperfect solutions ... just for memorizing.
You can use
[].concat.apply([], arguments)
if you'd like to concat arbitrary amount of arguments.