Message

Error type

What went wrong?

A function that calls itself is called a recursive function. In some ways, recursion is analogous to a loop. Both execute the same code multiple times, and both require a condition (to avoid an infinite loop, or rather, infinite recursion in this case). When there is too much or infinite recursion, JavaScript will throw this error.