Ad
  • Default User Avatar

    Yup, this got me too. The description ought to make explicit the requirement that there be no newline character at the end.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Your English is perfecly fine, don't worry. :) Yes, preloaded MORSE_CODE is a bit different from Wikipedia page (for example, it contains SOS as a single signal).

    The point of this kata is not in copypasting of data from Wikipedia, the point is creating a correct algorithm using existing data, whatever they are.

    As for your Unknown error, I could suppose 3 reasons for that:

    1. Connectivity problem, it happens here on CodeWars. Try reloading a page.
    2. The kata launcher for the particular language may be down, try again in an hour or two, or the next day.
    3. Make sure you're submitting the solution for the correct language. It could be lots of fun trying to fix a piece of JavaScript code that for some reason doesn't work when submitted as Java code. :)
  • Custom User Avatar

    Your example doesnt work for me :(
    When im using MORSE_CODE in my code im getting "Test didn't pass: Unknown error".

    OK, i created my own MORSE_CODE array based on wikipedia, now im getting "SOS THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG,', expected 'SOS! THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG." Curiously, i think preloaded MORSE_CODE is different from a wiki morse. How can i get the correct(?) value so that I could pass that test

    (sorry for my english im 11 year-old schoolboy from bangladesh)

  • Custom User Avatar

    I don't want debate about semicolons but I just don't like them. I found my code cleaner without it.

  • Custom User Avatar

    Well, I completely agree with you, the best practices disregard sequential tiles.

    Actually I have a confession to make - I knew about that when I created the first one, and the created three more ignoring it. Then while creating 5th one, I came up with an idea to drop the #Number part and naming each kata according to the pattern that the user will have to make - So I named the 5th one Odd Ladder, then 6th one Even Ladder, and so on... But as I couldn't figure out a name for the first four katas so I didn't dropped the #Number part.

    So I request you to throw up some light on this matter and provide me with a solution, how can I remove the #Number part. ^_^' Will be waiting for your reply. & Thanks for Lightening this issue up I really appreciate it :)

  • Custom User Avatar

    While this is probably not longer up-to date, the best practices disregard sequential titles:

    Avoid Sequential Titles

    Many kata authors have in their mind a linear progression through exercises they have divised. Due to the non-linear nature of CodeWars, however, people cannot be expected to follow exercises in sequence. This leads to odd circumstances where kata intended later in a sequence are approved, while earlier ones are not. It is best to simply avoid sequential exercises all together.

    However this doesn't mean that creating related kata is not encouraged. You can use a title prefix to help group related kata so that they are easy to discover. For example. Sorting Arrays: Basic Sorting & Sorting Arrays: Bubble Sort. The prefix will cause the "related kata" section to be more accurate.

    I just came across that section and thought that you were interested in it.

  • Custom User Avatar

    I experimented using the test console. MORSE_CODE['...---...'] === 'SOS'.
    Thanks for the response.

  • Custom User Avatar

    Just like that, it's a global variable.

  • Custom User Avatar

    How do I access the MORSE_CODE dictionary in js?

  • Custom User Avatar

    You're right. I found the replace(/ /g,'#') suggestion below which helpeed me debug this. Always learning! Thanks.

  • Custom User Avatar

    Same problem I guess ^_^' Extra newline at the end of pattern string(output).

  • Custom User Avatar

    This is frustrating - I can't see any difference between my result and the text case expected, and yet it's failing. Did we get anywhere with those white space tips?

  • Custom User Avatar
  • Custom User Avatar

    No love for the semi-colon?

  • Loading more items...