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.
I was failing at the same test. Try to figure out how your function behave when you pass boolean values as input
This comment is hidden because it contains spoiler information about the solution
I thought about this but thought there might be some longer years thrown in exactly because of this. Then again, "YYYY" does imply only four-digit years would be used...
Well, to answer your original question, that seems a good idea (though it may depend on the language you use, which makes it more or less difficult), and that's how I personnally solved this kata in several languages (but in others I did it only parsing the array, and not destructuring it, which is a better and more instructive practice, IMO). Now, it's easy to get lost and/or do something bad so that it eventually doesn't work. Hard to help you without knowing more. You should consider carefully the tests that fail, print stuff to check the progress of your output... In one word: debug it.
My bad, thanks.
Read this: https://docs.codewars.com/training/troubleshooting/
You're using a couple global vars there. Try calling your code in those compilers more than once.
Use spoiler flag next time.
This comment is hidden because it contains spoiler information about the solution