Welcome to the Working with Break and Continue Statements Practice Lab. In this module, you will be provided with the instructions and devices needed to develop your hands-on skills.
The following exam objective is covered in this lab:
- 3.3 Complete and debug loops
It will take approximately 10 minutes to complete this lab.
Exercise 1 - Working with Control Flow Statements
In switch-case, the break statement is used to come out of the case condition. Similarly, in loops, the break statement is used to break the loop completely. The control comes out of the loop and shifts to the next statement outside the loop body.
The continue statement forces the program to terminate the execution of the current iteration within a loop if the condition is true. It tells the interpreter to recheck the condition from the beginning of the loop and continue the execution. After the loop is executed completely, the control comes out of the loop, and shifts to the next statement outside the loop body.
In this exercise, you will learn to use the control flow statements such as break and continue in loops. You will perform the following tasks:
- Task 1 - You will download the Visual Studio Code workspace (ComputeGrade) from the Intranet and open the HTML page named Grade.html in the ComputeGrade workspace.
After completing this exercise, you will be able to:
See the full benefits of our immersive learning experience with interactive courses and guided career paths.