Break statement: The break statement is used to jump out of a loop. It can be used to “jump out” of a switch() statement. It breaks the loop and continues executing the code after the loop.
Continue statement: The continue statement “jumps over” one iteration in the loop. It breaks iteration in the loop and continues executing the next iteration in the loop.
- break statements: It is used to jump out of a loop or a switch without a label reference while with label reference, it used to jump out of any code block.
- continue statements: It used to skip one loop iteration with or without a label reference.
Example: This example use break label statements.
Example: This example uses continue label.
Example: This example illustrates without using any label.
- What is the difference between “word-break: break-all” versus “word-wrap: break-word” in CSS ?
- Difference between break and continue in PHP
- What is the use of number after “break” or “continue” statements in PHP ?
- continue command in Linux with examples
- PHP break (Single and Nested Loops)
- Break and Next statements in R
- CSS page-break-before Property
- CSS | box decoration break Property
- CSS | word-break Property
- How to break line without using <br> tag in HTML / CSS ?
- Tips for restarting career after a break
- break command in Linux with examples
- CSS | page-break-after Property
- CSS | page-break-inside Property
- How to insert line break before an element using CSS?
- How to prevent column break within an element?
- How to break an outer loop with PHP ?
- How to break _.each() function in Underscore.js ?
- How to define a possible line-break using HTML5 ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.