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.
Spend yestrd evening and today's morning.
not gonna make it to be developer but atleast QA automation atleast. i hope.
same lol
I think to not have it available is the point of this kata.
im too stupid to understand a task. cant get exmple even
glad u haven't see my solution
This is caused by outdated and confusing formatting of test cases layout. Fixed in update of the tests.
that's the way i understand. it's just not easy sometimes to explain me things. Now i just one line and code i wrote worked. prolly i won't get points cuz skipped already but still and i learned.thank you!
It's not a good idea to just tell the answer, or you don't learn much from it. But Chrono79 told you what the problem is exactly, and I tried showing you small steps, so you could find the problem on your own ( but you didn't seem to try them :/ ).
If you do recursion, and use
console.log
in it, you will get the answer in console, but nothing will bereturned
to you from the initial function call, so you get undefined as the final answer. CodeWars tests work with returned values, and not output from console.It doesn't mean you can't use
console.log
, but you should understand that your code doesn't stop on that line. That's why I suggest looking at recursion online, compare with your code, and see if something is missing.i don't mean to be rude or say i can't be wrong. just no one points me a mistake and i can't see atm. i facing some issues in other katas mb once i realise my issue i will come b to fix code of this one.
Well, it's your choice to believe in some fairytales, and not the truth. However, don't be surprised to see the same thing when you do another kata involving recursion :P As a popular phrase goes: "you can lead a horse to water, but you can't make it drink"
for some other reason
Actually, that's the entire problem... And if you don't think it is, why is your solution not accepted?
That's because you don't understand the difference between console.log and return.
Please read this: https://docs.codewars.com/training/troubleshooting/#expected-the-same
all right. having console.log shouldn't be a problem anyhow. if log show correct answer and followed with return statement then should ok. i guess u test for soluton which fits ur specific pattern.
not a pleasure to deal with kata.i'll just skip it. have a nice day
You still have
console.log
s in your solution. There shouldn't be any. And from what I see the problem is the same, your recursion is wrong.Loading more items...