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.
Reraised above, due to lack of random tests
That was helpful. Thank you
surprising!
My solution is similar to yours. But I prefer to not hardcode a lot of [-4..-1]. Better to create helper method, because if requirements changes - you should edit only one helper method instead of looking through all the source codes.
also #_ =P
Nevertheless, I just learned a new enum =D.
Well, description limits n to 0 <= n < 1000000000. I think gsub(/.../, '\0,') would be shorter and faster than scanning for variable length.
@JoshBrodieNZ You're right! That's a great update to CodeWars. It has been very frustrating being unable to edit this kata!
Have you tried to edit the description? My understanding is that recent changes should allow the description on a locked kata to be edited.
This kata is way too old for me to edit it now (it's locked), but if I could I would change the description to:
"Write a function named
numbers
that returns true if all the parameters it is passed are of the Number type".So
new Number(4)
is an Object. The other one that tripped some people up isNaN
, which is of course aNumber
.nice