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.
It looks like you're doing something really weird.
You shouldn't be putting anything into
MORSE_CODE
, the table is preloaded, just use it to decode separate characters.There're aren't two test cases that have the same input but expect different output.
Probably the problem is that CodeWars console output is rendered as HTML, which means, for example, that multiple spaces would look like one when printed.
If unsure, I would suggest wrapping the string being printed in
<pre>
tag or printing in hexlified format.I was printing out the input to see what they look like before putting them into MORSE_CODE.
I realize that two of the test cases have same input but different output? instead got: ". ." is the input from the test cases.
Could you please clarify your question? It's unclear what's happening.
The first question I would ask is why your function returns Morse code while it's expected to return decoded symbols. :)
Guys, what does (!) 3 mean? I got that when I ran my attempt