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.
% means Modulo operation.
https://en.wikipedia.org/wiki/Modulo_operation
if (x % 3 === 0) means x could be one of the values 0, 3, 6, 9, ..., x, 3x, ..., it could be -3, -6, -9 and ...
Sure,
"/" is indeed used to divide.
So: 4 / 2 is equal to 2
And:6 / 3 is also equal to 2
However when you use the % operation the result is equal to the remainder left after a division
So: 4 % 2 is equal to 0 because there is no remainder when you divide 4 by 2
However: 7 % 3 is equal to 1 because 1 is the remainder (3 X 2 )