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.
Sometimes brute force is the way to go.
...
This might not be that time, but sometimes it is! I also used this solution.
Thank you! Much appreciated.
If someone is still looking at old katas like this, can you explain why this doesn't need a "const"? Mine seemed to break without it.
Coercion in this way is really useful sometimes!
This comment is hidden because it contains spoiler information about the solution
Neat use of the OR here. Once again I've learned something.
I learned a new string method today. Fun!
This is excruciating and I love it.
Outstanding. This is why I love Codewars.
I both hate and love this. The perfect Codewars answer.
In the long run this looks like a much better way to handle it than cramming the replacements into a single line. Production best practice probably.
I like how short and clean this is, without being too obnoxious.
Oh interesting! I like your solution.
I like the way this solves the problem. Switch/case is such a bulky syntax, and this cleans that up nicely.
This was my choice too. I wonder if anyone has done a speed/efficiency comparison between this method and the original one suggested in the kata (map and join). Does it depend on how many items are in the array?
Loading more items...