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.
I wrote a very similar solution with much more readable variable names. The biggest differences are that mine uses a slice instead of the first for loop, and reads the length values inside of the main loop rather than assigning a new array for them.
https://www.codewars.com/kata/reviews/56a5db17af136c8210000058/groups/635a0ade4e920a000183011d/
I wrote a very similar solution. The biggest differences are that mine uses a slice instead of the first for loop, and reads the length values inside of the main loop rather than assigning a new array for them.
https://www.codewars.com/kata/reviews/56a5db17af136c8210000058/groups/635a0ade4e920a000183011d/
This comment is hidden because it contains spoiler information about the solution
I'm shocked that over twice as many users solved this with the ternary than without.
This comment is hidden because it contains spoiler information about the solution
I love this solution!
This comment is hidden because it contains spoiler information about the solution
Your recursive solution is way cleaner than mine!
Wow. Your recursion is way neater than mine!
Ugliest one-liner I've ever forced. Need to learn spread syntax and the Math library!
Why is using substr or slice better than just doing x[0] in this case?