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.
12.0
1234.0
Yes, surprised it passed all the tests. I was checking '123 ' also. Does not pass. Otherwise, it looks really good. But then, if it doesn't pass...
This shouldn't pass as others have said. If you do validatePIN("123 ") it breaks it.
You should add something like ...&& pin.charAt(0)!=="-"... in order to exclude negative values like -333 or three or five zeros preceded by a '-' (-00000)
error
Goodbye, invalid solution ;-)
Yeah this one shouldn't have worked.
validatePIN('-12345'); // should return false, but returns true
How does this get around negative conditions?
You need one more check. Like the last, but much more simple.
Well, you found a hole in the test suite at least
saved me from ripping out all my hair :D
It won't work with input like -111!
wow