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.
Excellent, I'll read up on that link. Thank you for your reply.
The chief advantage is that all the objects will share the same method instead of a new one being created for each instance.
You can find a more detailed difference here: Declaring javascript object method in constructor function vs. in prototype
I'm curious about the difference between adding the method to the constructor versus using the prototype method as shown in this answer. What's the advantage? Many users have voted this solution a best practice so I imagine the difference is significant. Thanks.
Needs fixed tests for card number length.
Currently these are only randomly triggered by the random tests.
And the test failure message needs to be helpful in this case.
(Ruby version, but I expect the other languages are similar.)
Ok thank you, I appreciate your quick reply. I'll continue to write tests and try to figure out why I'm getting a false match.
No you're not. Unfindables are just those numbers that exist outside of valid card numbers - so your solution is matching numbers as Mastercard even though they're outside the expected range/rules for a Mastercard. I might change that message to make it clearer I think.
I'm unclear on what "unfindables" are. I've written about 20 or so tests that pass and when I submit my solution everything passes except the second of the two "It should return Unknown for unfindables". The submission test result stated "Expected: Unknown, instead got: Mastercard". I wrote a new batch of tests to try and nail down variations of the Mastercard rules that shouldn't pass but cannot replicate this failure. Am I missing something in the definition of "unfindables"?