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.
For checking users' solutions, you can try this: https://www.codewars.com/kumite/579d80d97cb1f385ed000231?sel=579d80d97cb1f385ed000231
I did it another way in a different kata though, so let me know if this doesn't work.
That really just depends on how you write your solution. You're right in a way though; they're not necessary, but could help someone get some ideas to form their answer.
I shortened the description a bit and gave the sections some headers; it's still long because of displaying the patterns, but hopefully it'll help others.
OK, I removed the invalid input tests section; also, removed a bunch of tests that, on second look, weren't providing much value. I left in the tests that demonstrate different truthy/falsey values, even though there's a lot of them. I probably wouldn't do this again in future katas, but I figure someone might learn something from reading through them.
Oops, didn't mean to submit this one.
Fair point; I'll see if I can reduce the description length somewhat.
Looking into it. Thanks for the feedback!
Thanks for the compliments; hmm...I thought the prompt was original (if not so much ways to solve it). :(
In the description there's a code block with a couple examples of errors that should be retained, including:
Is that what you mean?
Your implementation doesn't actually need to explicitly throw a RangeError given Number.MAX_SAFE_INTEGER. You can see it still passes commenting out
!Number.isFinite(n) ||
.The idea behind testing for the errors was to avoid solutions that just say something like
else
return 1 level of THIS.I agree there are A LOT of tests going on, but would you change your vote given some specific change?
This comment is hidden because it contains spoiler information about the solution