
Actual it is stopping execution of current item of iteration and going to the next item for iteration which means it allows loop iteration to be continued with the next item.


Mostly we use the continue statement to skip the execution of some specific conditions or simply move to the next iteration of the loop.Ĭontinue //Here we have used the continue statement inside the loop

Generally, we put this continue on any condition where we want to skip the execution and go to the next iteration of the execution of the program. Syntaxīelow is a simple syntax for the continue statement, here we have written continue inside the loop, this loop can be for a loop. In go language continue statement allow the developer to skip the particular condition and start from the next value, for example, if we have a list of students and we want to add some extra marks to each student except for the students belongs to a particular section, in that case, we can put continue statement in the loop and the execution will start from the next section, we can say continue is little similar to break of other programing language and it allows us to skip the iteration of the loop at any time inside the loop, with the help of the continue statement we are able to avoid unnecessary execution of some codes. Introduction to Golang Continue Statement
