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.
['<','='][n==0]
That was impressive.
The answer is in the error itself: you're trying to use
toLowerCase
onundefined
. It's clearly not a string.I keep gettin 'TypeError: Cannot read property 'toLowerCase' of undefined' even though I'm using the method with a string. The code works just fine when I test it in the console; what could the problem be ?
Thank you for the hint, you helped me a lot =)
You can look at the tests by printing the input:
Troubleshooting - print the input
For this kata, therefore, if you type:
print(title, minor_words)
in your function, you'll be able to read in console which inputs you are failing on.
As for tests 6 and 9 here, just to get you started: you will find that test#6 is using
ab
as inputtitle
andab
as inputminor_words
; it is expectingAb
as output notab
- Why? Because if you re-read the kata description:"(b) considered to be an exception and put entirely into lower case unless it is the first word, which is always capitalised."
so you should always capitalise the first word, regardless of whether it appears in the "exception" words or not.
(Python) I have an error in the 6th and 9th test. The sixth test 'ab' should equal 'Ab' and the ninth test 'First of in' should equal 'First Of In' . All other tests are good . Since there is no place to look at these tests, I can't understand what's the matter. Who had a plug in this place, who can tell me?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I agree, the description is disgusting, I've read it 10 times and I don't understand what they want from us. It would be good for the author to give more understandable examples and descriptions.
and here it was a shame!)))
Here you only need your own logic of thinking =) There are many solutions to this kata, the more experience in programming, the more concise the code turns out.
0 does not return, it gives an error, but in general it is brilliant :-)
Not a kata issue, your code mutates the input list, as the error's message says. Read this too: https://docs.codewars.com/training/troubleshooting/#post-discourse
This comment is hidden because it contains spoiler information about the solution
Do you mean string concatenation?
Loading more items...