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.
There's a way to make it one line tho :)
One line solutions are usually not the best ones (in terms of performance and readability) but people still upvote them because they look cool
Almost identical to mine :)
When all else fails, brute force gets it done!
Of course! So simple, why didn't I think of this?
Good to know I'm not the only one with an answer that's over 150 lines of code.
I feel as though this was more of a level 5 Kata than a 6 when considering the uptick in time commitment to work through each part of the problem.
Being a new JS Programmer, I was becoming disillusioned with every "easy" Kata top solution being one line of Regex.
I'm happy to finally see something very close to my answer as Best Practice.