A loop describes the process of a software program or script repeats the same instructions or processes the same information over and over until receiving the order to stop. If not handled properly, a loop can cause the computer to become slower as it becomes overwhelmed with having to repeat the same steps over and over causing it to get stuck in an endless loop.
Batch file loop
Below is a basic example of a loop in a batch file.
:BEGIN Echo Here is an endless loop! GOTO BEGIN
Other types of loops
Below are some examples of common types of loops in many popular programming languages.