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.
Wow! How did you manage that?
This comment is hidden because it contains spoiler information about the solution
The description says "only non-negative numbers are passed". So there's no problem here :)
Good catch, didn't pay attention to it. Thank you, corrected. :)
I like that NaN is treated as a number. I was doing a different kata that had NaN in the test cases and got temporarily stumped on it, I assumed NaN was indeed not a number...
It might be more than just a JS quirk. Python handles NaN similarly:
I guess NaN is also defined by an IEEE standard. http://en.wikipedia.org/wiki/NaN
NaN is actually a number. One of JavaScript's little quirks. I threw that test case in there just to keep people on their toes!
Exactly, there should be test cases for leading or trailing dots.
Test added, thank you!