AS3: Recursive Functions vs Loop Functions

A recursive function is a function that calls itself. The following code shows a simple example of recursion.

function trouble(){
trouble();
}

A recursive function like above calls itself unconditionally, cause infinite recursion. To prevent this from happening, practical recursion functions call themselves only while a given condition is met.
Continue reading