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
Great explanation, thanks. I misunderstand the function of Date.setFullYear(), now it all makes sense. setFullYear() will add "365" days to current date, so after adding 356 days, 29 February will be 1 March next year, if next year don't have 29 in February. It's really clever!!
I've looked up the getMonth function, but I still don't get why t1.getDay() !== t0.getDay but t1.getMonth() === t0.getMonth() will get the correct answer? Because while t1.getMonth() === t0.getMonth() will also return true and stop the loop.
Could you please tell me about the logic here?