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 think the thing is that you forgot the case where string ends with a space. The result looks right but it's missing a space I had the same problem. I don't like this edge case it breaks the beauty of the code. But whatever
Post your code marking your post as having spoiler content and to increase the readability of comments or descriptions, see this page in the github wiki.
I doubt there is a problem with the javascript tests with that many completions. I've improved them anyway, now you can see what is the expected result and what is your function returning, and added some "random" tests.
This is a CW bug. You should try resubmitting your solution, although, for some users it may not work as well.
Try submitting again. It happens occasionally: https://github.com/Codewars/codewars.com/issues/1592