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.
The modulo operator (%) returns the remainder after dividing two numbers. If a number is divisible by another, the remainder will be 0, ergo the modulo operation will return 0. In this case, we are checking if a number is an integer. Math.sqrt(n) % 1 will only return a value other than 0 if the return value of Math.sqrt(n) is a decimal, since every integer is divisible by 1. Hope that helps. :)