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.
Well, since codewars is an open community, expect the worst comment possible since people have different opinion on how things should be. By common algorithm, I think this is already a correct and good one. Although, language-wise, yes it can still be improved.
Don't let this makes you not listen to the actual suggestion and improvement that is given from the comment, though. Just remember, in programming, there are many "best practices" out there. So, it's obvious if people have different opinion and just belittle others' solution. Don't let it get to you too much, and just keep learning.