The difference between break and continue in JavaScript
break statement and continue statement
##break statement
- Description: break statement, used to unconditionally end various loops (exit the loop) and switch.
- Note: Generally, you need to add a conditional judgment before the break statement. In other words: when the condition is established, the loop exits.
##continue statement
-
Description: End this cycle and start the next cycle. The code after continue is no longer executed.
- Note: Generally, you need to add a conditional judgment before the continue statement.
php.cn