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.
Your function doesn't return the correct result. It adds an extra space at the end.
Even if you fix that, your solution also does not handle words with double spaces correctly either (as in the 4th sample test).
You checked it wrong:
i'm using Javascript. first time reporting this. i did check if result matched with expect result
You need to tell us what language you tried, and show us your code. Otherwise, we do not know what to fix.
still broken sadly i had correct solution but was not right when expect out put was same as result output