Concept

What happens when a function calls itself?

ComputerScienceOne / Recursion

"The function in this case is called CountDown (). In Line 5 the function calls itself on a decremented value. When a function calls itself, it is a recursive function. When a language allows functions to call themselves they support recursion . This is not that odd of a concept. We’ve seen many examples where functions invoke (call) other functions. Each function call simply creates a new stack frame on the program stack. There is nothing particularly special about which functions call which other functions, so there is little difference when a function calls itself."

Related Ideas

What happens when a function calls itself? | ComputerScienceOne | Bifalgorithm | Bifalgorithm