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.
Thank you for the feedback! I agree, this wasn't the intended solution. I initially allowed it because it still managed to complete the objective, but in retrospect I should have just added these tests from the start. I've updated the Kata with the test cases =)
Well, that would mean that every time the function is called, those values are re-created. Doesn't matter so much for primitives like strings, but object like the regex will have to be put in new memory every time, and get garbage collected every time. It's probably a bit padantic, but that how I think of it, anyway.