Task iteration is one of the most frequently activity that every developer has to perform in most of its projects/applications. Iteration allows to repeat execution of set of statements for some definite time. It enables to avoid writing of same lines of code many times which not only is cumbor some but also waste of time.
So we can now summarise purpose of loop statements:
- They provide ability to repeat a set of statements for a specific number of times
- They provide ability to repeat a set of statemens for unknown number of times and/or can be stopped when some criteria is met during program execution