Ad
  • Custom User Avatar

    Ok got it now! and could pass the kata! thank you both!

  • Default User Avatar

    morseCode is the name of the object... (my console command contains that name). put that as the first line in your function.

  • Custom User Avatar

    Ok I'm in javascript and kinda lost 😅. The morseCode and console.log(`>${morseCode}<`); and morseCode , where do I input them? on the kata solution editor hit test and watch the result or where?

  • Default User Avatar

    this will show you the input (the arrows are to show the border of possible whitespace):

    console.log(`>${morseCode}<`);
    
  • Custom User Avatar

    The input is morseCode in javascript.

  • Custom User Avatar

    hey!, how does one do this? console.log(decodeMorse()); does nothing, I'm kinda lost

  • Custom User Avatar

    Yes, printing the input to the console.

  • Custom User Avatar

    The output you quoted specifically says that it expected your code to return '1 1' and '-1 -1', but your code incorrectly returned '1 0' and '0 -1' instead. I can easily tell you that the input in those two tests is '1 1' and '-1 -1'.

    You can write your own test cases in the test and see what the result is. Testing your own code is always a good idea when you are trying to debug it.

  • Custom User Avatar

    Mark your post as having spoiler content next time, it's a problem with your code, you're setting both max and min as 0 at first, no matter what the input value is. Array methods work just fine, again, a problem with your code, but I can't tell you what it is without seeing it.

  • Custom User Avatar

    I asked for the input, not the output, without it, how can you know if there is a problem or not? You need to print it using console.log().

  • Custom User Avatar

    What's the input of those tests? There are 30,013 javascript completions, so it's a problem with your code.