Aryan PrajapatKnowledge Contributor
What is a continue statement in javascript?
What is a continue statement in javascript?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Questions | Answers | Discussions | Knowledge sharing | Communities & more.
Ans: The continue statement moves or jumps over the current iteration in the loop if a particular condition occurs, and continues with the execution of the next iteration in the loop.
It can be used in looping statements such as for loop, while loop, and do-while loop. When it is used in a while loop, then it moves back to the condition. If it is used in a for loop, the flow moves to the update expression.
Using the continue statement, the program’s flow immediately jumps to the conditional statements, and if the condition is true, then the next iteration will be started; else, the control comes out of the loop.
Syntax:
1
2
(with or without label)
Continue; Or continue label_name