Loops are the most common way to repeat a task. Additionally sometimes recursion maybe better suited for your needs. Loops are more efficient to the fact their execution is allocated once, and is only re-executed. This is compared to recursion which requires the scope to be reconstructed.

Last updated