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.
There's no
hasListener
method anywhere, and no explanation of what the tests are trying to do - how am I even supposed to debug this?Edit: turns out there's a
observableMixin.prototype.hasListener
method, but again, if your solution is wrong and doesn't add this method to the created class, you will likely not be able to tell what's wrong.Nice one :)
I would also specify that the exception HAS to be thrown as new Error("message") rather than just trhow "message".
Also I would make the requirements more consistent as in all multiple caals to the same method would result in a conjunction (&&) and all arguments of the same function would be disjunctive (||) or the other way arround :)
This comment is hidden because it contains spoiler information about the solution
Thanks for sugestions. I modified the description to be more omogen.
Thanks :)
I'd recommend adding some example code in the description. Show how you expect the
extend
function to be invoked, with or without mixin and scope.Also, the function's argument names in the description doesn't match up with the argument names in the solution setup:
You should change one or both so that the argument names are consistent. The latter names are clearer IMHO.
Then, change your bullet list so that it has a bullet item for each argument, describing the type (string, function, object), what it represents, and identifying the arguments which were optional.
What else should I improve in this kata? :)
I implemented the wikipedia described approach and still remained confused :)
Hm, my solution is passing randomly, probably is not really correct :D
Is the recursive solution bad? I see the others had a different approach.
Oh I see. I 'll try harder 3:)
This comment is hidden because it contains spoiler information about the solution
Hmm "Bit count of 16777216 should be 1" test said.
Oh I see! Thank you for clearing that out for me :)
I am sure you can remedy it :D
As a last touch I have added tests for the mixin and specified it as being optional ;)
Hey christianhammer,
Congrats! you are the first one to solve it anyway :)
The mixin was not declared as being optional so it is not tested for as being optional., where is the problem? :)
My solution took care about the eventuality of providing some invalid value for the mixin by instinct :))
However, I find the problem nice and pretty much easy to be solved but I see that people don't like it, so I will probably quit the idea :)
Thanks for taking the time to solve and comment it!
Loading more items...