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.
They are functionally the same. This answer was made when template literals weren't widespread yet, but today they'd be preferred since they help with readability.
This comment is hidden because it contains spoiler information about the solution
Thats right
The /../ part of the code represents a Regular Expression (RegEx) that looks for any 2 types of characters. If the length is even, When it comes time to check for the last character (i.e. the underscore) it will not be able to find another character after it, and thus won't add it to the resulting array.
I get confused when the string is even, why the match method doesn't match the underscore character?
This comment is hidden because it contains spoiler information about the solution
haha @ the output comment, i had the same question
Very nice (and fast) solution.
Excellent solution
Yes. So is ToList.
clever solution
By far the best solution in terms of both clarity and performance (in my tests it's almost 10 times faster than the solution with list comprehension).
To learn software, of course. The only thing I've refused to learn is statistics.
Why do you bother with a software education website if you refuse to learn anything?
Wow! How did you manage that?
Loading more items...