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.
you really wrote
-,
?This comment is hidden because it contains spoiler information about the solution
Please, always format your code (triple backtick before and after it), as it makes things much easier to read.
Your code returns a falsey value for 0s and can't work for values which are not decimal numbers; at matt stated, I would test for numbers otherwise and there are plenty of ways, from regexes (do yourself a favour and learn them soon if you don't know about them), from merely checking if the given value is in the array
['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
.I don't really know why it doesn't work but I recommend using a different method to find out if the value is a number or not.