Subject: PHP

Break and Continue in Loops

Use a for loop to print numbers from 1 to 10.

Use the break statement to stop the loop when the number is 6. 

Use the continue statement to skip printing the number 4.

Select file or drag and drop

PNG, JPG, SVG

Preview