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
I still don't get the idea of this website
Added the same random tests that are present in Ruby and Python to Javascript. Also changed
Test.expect
forTest.assertEquals
. Feel free to close the issue if the other languages are ok.Fixed.
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.
I've tested my code in Repl.it multiple times, I'm getting the result that the test supposedly asks for. the test is broken friend, you migh need to either review your instructions (they may be misleading as to what you are actually asking us to code) or review the test, as the test is failing to notice that my code (results in Repl.it look identical to your example code) is working.
Re-raised as a more meaningful issue.
This line is misleading and should be removed.
Probably segfault.
Somehow it got through curation process, so maybe at some point community thought this might be a good challenge ¯\_(ツ)_/¯
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
I solved it (all green codes) but after the test I wasn't allowed to see the official answer without forfeiting the Kata I just earned. I would really like to know the simple answer(mine was probably too complex)