Ad
  • Custom User Avatar

    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

  • Custom User Avatar

    I still don't get the idea of this website

  • Custom User Avatar

    Added the same random tests that are present in Ruby and Python to Javascript. Also changed Test.expect for Test.assertEquals. Feel free to close the issue if the other languages are ok.

  • Custom User Avatar

    Fixed.

  • Custom User Avatar

    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.

    JavaScript Completions 8351

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    Re-raised as a more meaningful issue.

  • Custom User Avatar

    But can you do it in 1 line of code and without any conditionals?

    This line is misleading and should be removed.

  • Custom User Avatar

    Probably segfault.

  • Custom User Avatar

    Somehow it got through curation process, so maybe at some point community thought this might be a good challenge ¯\_(ツ)_/¯

  • Custom User Avatar

    This is a CW bug. You should try resubmitting your solution, although, for some users it may not work as well.

  • Custom User Avatar

    Try submitting again. It happens occasionally: https://github.com/Codewars/codewars.com/issues/1592

  • Custom User Avatar

    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)