Ad
  • Custom User Avatar

    SO did this actually work for you because this was my exact approach and it returns undefined?

  • Default User Avatar

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

  • Default User Avatar

    use MORSE_CODE['....'],it will return 'H'

  • Custom User Avatar

    Sorry, I thought this comment was for my another kata, so I answered unadequately. Mea culpa.

    Also, thanks for finding a bug in the wording - it should be "extra spaces handling", not "extra zero handling". For some technical reason I can't edit the Test Cases any more (simply can't type in that window), @jhoffner, could you please make this replacement for me?

    So, @Rohan.ag, the problem is about some extra spaces at the beginning and the end of the input - it is mentioned in the kata description, check it.

    As for knowing the input, it's very simple - just print it. :) But not that console output here on CodeWars is HTML, so remember to wrap everything you print in <pre> tag to not miss anything important like extra spaces. :)

  • Custom User Avatar

    The JavaScript version could include instructions on how to access the morse code library.