In this lesson, we'll learn about the modulo operation and how to implement it using recursion.

What is the modulo operation?

The modulo operation (abbreviated as mod) returns the remainder when a number is divided by another. The symbol for mod is %.

The number being divided is called the dividend, and the number that divides is called the divisor.

The illustration below represents the concept of remainders using basic division:

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.