Using the continue statement:
Similar to the break statement, the continue statement is used to stop the execution of the loop. However, continue statement does not exit the loop; it executes the condition for the next iteration of the loop. If the loop has any statements after the continue statement then those statements are executed.
Demo:
- Let’s create a document called continueStatement.html.
- Write the following code:
- Execute the script by opening the file in the web browser. If you are using Internet Explore click on “Allow Blocked Content” to allow the script to execute and if you are using Mozilla Firefox then click on allow “ActiveX Controls”.
Thanks for reading the blog.