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 +1 is acting as a counter for the times it is neccessary to apply the logic until you reach the condition, the inputed number becoming only one digit.
When that happens, the function returns 0 instead of calling itself again.
Then, it adds one for everytime it "goes up" the recursive ladder, returning the number of times it called itself because the number was still not a single-digit.