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.
So you used apply() to be able to pass the array in the Math function as an argument, while the rest of them used the spread operator. New thing to me and useful too.
actually the min and max functions accept numbers and list is an array so if we pass an array it wont work thats why we use the spread operator to spread the elements of an array into individual arguments (numbers).
It's clean but it's an overkill and it'll be a bit slow too because of handling month and year.