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.
true but should be a suggestion. not an issue IMO
This comment is hidden because it contains spoiler information about the solution
I think the same can be done like this:
return root%1 ? -1 : Math.pow(++root, 2);
since root%1 would return a non zero value (i.e. it's remainder) if it not completely divisible.