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.
I olso made one by myself and its work for me, try this:
const TOT_MORSE_CODE = {
".-": "a", "-...":"b", "-.-.": "c", "-..": "d", ".":"e", "..-.":"f", "--.":"g", "....":"h", "..":"i", ".---":"j", "-.-":"k", ".-..":"l", "--":"m", "-.":"n", "---":"o", ".--.":"p", "--.-":"q", ".-.":"r", "...":"s", "-":"t", "..-":"u", "...-":"v", ".--":"w", "-..-":"x", "-.--":"y", "--..":"z", ".----":"1", "..---":"2", "...--":"3", "....-":"4", ".....":"5", "-....":"6", "--...":"7", "---..":"8", "----.":"9", "-----":"0", "|":" "
};
This comment is hidden because it contains spoiler information about the solution
You could put the sentence that it's failing on into an online Morse Code generator. It's what I did but the kata is broken for me (see my recent comment).
thnx. Sorry
works
Also read the note again:
???
This comment is hidden because it contains spoiler information about the solution
This kata is available for JS but without any dictionary. I am using one created by myself and it doesn't work with 3 cases. Since I cannot check the original symbols it is difficult to fix
I love it. Short. Elegant. Literally does what this function is supposed to do. Change every character except the last 4. Beauty!