• Custom User Avatar

    I'm getting the correct values, but after the first success it's returning everything as undefined. I.e. I'm getting B as my last result, and it's saying B is the correct answer but it's saying it's undefined. Am I missing something?

  • Custom User Avatar

    Swift Translation kumited. Please review and approve :)

  • Custom User Avatar

    I like your solution, very similar to mine. Match vs split.

  • Custom User Avatar

    Sample tests are trivial .. examples. They show how your code gets invoked. The real test code is hidden. If you need to know what input you get wrong answer for you can always print it out from within your function.

  • Custom User Avatar

    Thanks, Natan. My code was failing a certain test it seems. I solved it, but I was confused if I was missing something inheirent to code wars to turn in.

  • Custom User Avatar

    If you're implying that the same tests would be run again and nothing else, then, no.
    If you're not implying that, then your question could be rephrased to:
    "My code fails one of the tests."
    Which is typically caused by having an incorrect solution.

    Or maybe you mean something else entirely. But I'm now out of guesses.

  • Custom User Avatar

    I'm brand new at code wars. My fixed tests are passing, but when I do the "attempt" it's all failing. Anyone know why?