April 2018
Intermediate to advanced
222 pages
5h 28m
English
Loops are based on expressions. The logic of the expression decides the continuity of the loop. However, there are times when you are in between loop execution and would like to go back to the first line of code without executing the rest of the code for the next iteration. The continue statement helps us do that.
In the following screenshot, the for loop is executed till the end; however the values after 5 are not logged at all:
