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.
Didn't know there would be an equasion for this :)
a and b could be swapped instead of using Math but using your variables makes the equasion more understandable.
Thank you for the feedback! I agree, this wasn't the intended solution. I initially allowed it because it still managed to complete the objective, but in retrospect I should have just added these tests from the start. I've updated the Kata with the test cases =)
This slightly confused me as "TODO: GIVE ME A DESCRIPTION" statement has a colon after "TODO" which was making me think that the key I was trying to add was "TODO:" with a vlaue of "GIVE ME A DESCRIPTION". After looking at the solutions though I can see the key/field/ feature you are being asked to add to the object is 'description'. I'm wondering if i was the only person who was puzzled by this.
So my solution passed and I belive it should have not. I see many others like mine that are marked as correct. It says that the objects themselves shouldn't be changed. But if I try
widget.foo
it will be undefined. Provide test for such scenarios maybe. Or I've misunderstood what was asked for?Well, that would mean that every time the function is called, those values are re-created. Doesn't matter so much for primitives like strings, but object like the regex will have to be put in new memory every time, and get garbage collected every time. It's probably a bit padantic, but that how I think of it, anyway.
Isn't it better practice to put the find and replace variables inside the function?
So if someone wanders what is the double tilda sign:
http://stackoverflow.com/questions/5971645/what-is-the-double-tilde-operator-in-javascript
I hope this is better. I made the method name in the same way. I didn't know if it is possible to do it without a block of code like it was before.
Yeah. sorry. The description is shared by all languages. It looks like you replaced the JS examples with Python examples, but they both need to be there in order for both languages to have them. By simplying adding the python examples underneith (or above, doesnt really matter) the JS examples, the system will know that the languages are grouped and will filter out the ones that arent relevant when taking a kata.
Could you elaborate on that. I don't quite understand. Are you talking about the code in the description?
Python examples should be added underneith javascript examples, not replace them.
How does the bit operation work. Could someone elaborate.