Ad
  • Custom User Avatar

    Just to be sure, did you run your solution in your IDE with exactly the same examples as the ones in the "Sample tests" box? Specifically, did you test your solution in your IDE with inputs which have empty lines? Your solution has a bug and handles empty lines incorrectly.

  • Custom User Avatar

    I'll say it a third time: you need to debug the failing test case. Not a succeeding one, you won't find the problem in a case that doesn't have the problem. You're not seeing the error in your local environment because you're not running the failing test case.

    There's nothing abnormal about that. Got a failing test case? Debug that test case.

  • Custom User Avatar

    No, your reasoning is not correct. It is perfectly possible that your code has an error which is visible on Codewars, but not in your IDE.

    To be able to find the error in your code, we have to know your code.

  • Custom User Avatar

    But why do you need help? What's the problem? Failing tests is normal when your code is wrong. When you say it works correctly in VS Code, that sounds to me like you didn't test the case that your code does not work correctly for.

  • Custom User Avatar

    debug that your code for that test then? I don't understand the question.
    sometimes people use the fact that some tests pass as proof that the code is correct. but it's the other way around, that if some tests fail, then the code is incorrect.

  • Custom User Avatar

    What did you find confusing about the description? I thought it was pretty easy to understand.

  • Custom User Avatar

    it sounds like you are using an old version of Node JS. String.prototype.at() requires Node JS >= 16.6. In the dropdown menu of the trainer, what is the Node version you have selected ?