A recursive function is a function which calls itself.
Here’s how it goes: beginning recursion -> recursive loop of repeating a task -> until we hit our base case.
a function being defined is applied within its own definition. While this apparently defines an infinite number of instances (function values), it is often done in such a way that no loop or infinite chain of references can occur.
Recursion is the process a procedure goes through when one of the steps of the procedure involves invoking the procedure itself.
while
loops but much cleanerThere are 4 distinct pieces of a recursive function: