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.
LOL! Yes.
result and my returned value equal but did not passed wtf?
so we are monsters then :D
oh shit, here we go again. :D
i am prety sure the girl who pick what lead of it it might return you madly :D
Therese problem in ramdom test cases. Kata is not provided piority of the procces. Some Cases for example [..0,0,1,2,3.] could be [0*2,1-3] and [..0,1-3,,] etc. Same code passed serveral tries later to submiting progress.
that means you need to use a methot that throws a message to system. that methot is throw, try catch method. this is helps us keeping on the line all inputs or etc.
Yes, and that's ok. In your code you did this:
And had to use n as a string and s as a number to make sense of that change, because the tests called your function with the first argument being a number and the second one a string.
function repeatStr (n, s) {
return '';
}
describe("Tests", function() {
it ("Basic tests", function() {
assert.strictEqual(repeatStr(3, ""), "**");
assert.strictEqual(repeatStr(5, "#"), "#####");
assert.strictEqual(repeatStr(2, "ha "), "ha ha ");
});
});
repeatStr(3, "*") ->>>> repeatStr (n, s)
in here n equals 3, s equal *
There is no problem,
n
is the number of repetitions ands
is the string. In your solution you swaped them, but useds
as a number andn
as a string, there was no need for that.This comment is hidden because it contains spoiler information about the solution
you take this kata to another level man, you are best :D
we need longer plz :)