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.
Forbidding
toString
is useless if you don't also forbidn+""
( which is shorter! ) but a lot harder to test for ( and then there's`${n}`
).I hate restricted JS in general, but this one is worse than a lot of others. At least try to explain why the restrictions are there, what point you are trying to make. Also, handle
0
, that really is a no-brainer.No test for
isPositive(0) === false
, and your solution returns the wrong result for it.The anticheat is weak.
Sample tests are not testing anything.