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.
you need to test by passing something more complex to the function besides ABC. songDecoder("AWUBWUBWUBBWUBWUBWUBC"); This will help you understand why you're getting errors.
That's because without the join, it fails the first test, and with it, it fails the second.
The only error is in your code:
You can try changing Node version to 8 to see all the logs (no matter if your code fails), 10 onwards it stops when it fails one test and the next ones aren't executed.
This comment is hidden because it contains spoiler information about the solution
There is no issue with the kata, your code is wrong.
And it'll fail with inputs like
"AWUBAWUBA"
too. Useconsole.log
to evaluate middle values or something like PythontutorThis comment is hidden because it contains spoiler information about the solution
I'm having an issue with the Javascript version of this challenge. On my local IDE, using the same language version and same test inputs, the test for the first case returns the correct anser of "A B C", however, when performing the same task on the kata, the function returns "A B C". This is especially odd considering that utilizing the .join() method with '/' instead of ' ' returns the correct answer with backslashes instead of spaces ("A/B/C"), but as soon as it is switched back to .join(' '), the test returns "A B C". This seems to be an issue with the kata. I will reply with my solution as a spoiler.
that's what makes it so powerful. you can still go off and write your own methods/solutions to problems you encounter much like you would in java, but if you happen to know little tricks like these it can make the whole process much easier.