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?
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.
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.
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.
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?
Swift Translation kumited. Please review and approve :)
I like your solution, very similar to mine. Match vs split.
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.
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.
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.
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?