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.
This comment is hidden because it contains spoiler information about the solution
Seems that this solution can't be used like a common solution, see tests here http://stackoverflow.com/a/34466248/3429127.
That means that you should avoid usage of ">" and "<" in comparator.
It's a good way to combine assignment and return with brackets (some action, return value)!
Just want to notice that JS native sort method affects on initial array.
If we want that list argument stays the same we need to make a copy of it inside the function (e. g. using slice()).
I look through all solutions and it seems that better to initialize names arrays before kata starts and provide users with variables names. Because every user creates its own data.
Good way!
Actually I thought that toString method for date is locale dependent, but not:
The toString() method always returns a string representation of the date in American English.
What I don't understand in this solution - is an array of function parameters ([ x1, y1, x2, y2 ]). How can we fo this? Is it a new ES6 ability?