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.
We are mutating (reducing) the items arrays' length every time we execute splice method.
Modulo is used to check if our index value is bigger than an arrays' length.
If it is we just use the remainder as an index, because it goes at the begining of an array again.
Think of it like a circle, it will go back to where it began.