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.
Ah, didn't pay attention to the time being, I am new to the site.
This code was written before that syntax existed.
if doing the "single liners" you might as well use arrow functions, so
and so on.
really nicer and more readable, yes. :)
Still prefer the one-liner, especially the new version with fat arrows: http://www.codewars.com/kata/reviews/54be2a15518b8dcff90001f2/groups/56fc240e4504004e510009dd
It's less readable because you put the function decs on new lines, which I've never seen before and don't think anybody actually does. The code itself is still not great as using arbitrary names such as "v" and "w" don't give you any hints about what the code actually does.
Also, best practice should definitely include how the code is presented. Code that can be passed around from colleage to colleage and be quickly understood by everyone should be something you're looking to achieve, i.e. it should be part of the best practice.
This is exactly my solution, except I had no idea that trim() existed so I made a super short filter after the first split!