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.
Ok got it now! and could pass the kata! thank you both!
morseCode
is the name of the object... (myconsole
command contains that name). put that as the first line in your function.Ok I'm in javascript and kinda lost 😅. The morseCode and
console.log(`>${morseCode}<`);
andmorseCode
, where do I input them? on the kata solution editor hit test and watch the result or where?this will show you the input (the arrows are to show the border of possible whitespace):
The input is
morseCode
in javascript.hey!, how does one do this? console.log(decodeMorse()); does nothing, I'm kinda lost
Yes, printing the input to the console.
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.
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.
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()
.What's the input of those tests? There are 30,013 javascript completions, so it's a problem with your code.