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.
The description doesn't need to be updated because:
Ad. 1 Description says you have to "break a code of 3 digits" not numbers, and digits are integers;
Ad. 2 Digits are numbers but numbers aren't necessarily a digits, so they have their min/max value (look at the definition of digit)
I think the description could be expanded to answer:
Also, I imagine that this will require me to store some global state which I need to clear each time my function is called with null. I agree with @arnedag that it would probably be cleaner if you passed the guess function as the parameter, then returned indications on a bad guess, returned
true
on success, or threw an error if we made too many guesses.Here is an example of what that might look like: