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.
Approved.
Approved.
The error was in the scope.
I would say that this is strange, because if you run everything single-handedly, then everything goes well.
I have fixed the error, thanks.
Oh, so it appears "expectation from our test" was correct after all :^)
I totally agree with you. This is where the work is done in an array within an array. I saw a great solution here via replace and regExp
OP: posts unformatted code
Also OP: " Everything is written very clearly"
See this paragraph for info how to post your code very clearly.
Ah, okay, I figured out what is going on.
The expectation is correct. Please, check how the
doTest
function works, you have its definition on your hands.So, kata is okay, your code is at fault.
Hint: There's probably a few reasons folks say not to use global scoped variables in your code. You just managed to hit one of these reasons.
Hint 2: this
It's impossible to figure out what your code is, use markdown to paste your code
Your function has a bug, it returns wrong results when it's called more than once. Try following test cases:
Run both tests one after another, and you will the that the first one passes, and the second one fails.
Before clicking that the problem has been solved, you need to check the code. Everything is written very clearly here that the code with the wrong test is expected. P.S for MikChan(expected is an expectation from your test and it is not correct. since the first character must be uppercase)
Are you laughing? My code will return the correct value 'ZtK AuWyK Dy HqV'
(it also says that he was just expecting the meaning of the first character with a small letter)
Because your code gives a wrong answer. For the input "ZTK AUWyK Dy HqV" it should return "ZtK AuWyK Dy HqV", but returns "zTk AuWyK Dy HqV" (the first letter must be uppercase).
Not an issue.
This comment is hidden because it contains spoiler information about the solution