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.
This comment is hidden because it contains spoiler information about the solution
wow
I had a test case when I was receiving "n" just like that, a string, is that algorythim solve that as well, and if it is, could tell me how?
My guess is age.
Number.isInteger
is ECMAScript 2015, and this kata is from early 2015, when that may not have been supported yet.It's not the canonical polyfill either though, so the test may not be perfectly accurate (then again, it very well may be).
Is 1e+21 strictly an int? Isn't it too big for JavaScript?
parseInt approach will return false for numbers bigger than 1000000000000000000000. This is due to the representation of the number as '1e+21'.
Can anyone explain why to use parseInt instead of Number.isInteger?
This comment is hidden because it contains spoiler information about the solution
this is just like mine, nice!
cool!
well great