Skip to content

Latest commit

 

History

History

README.md

Loops

  • while
  • for
  • do while

while Loop

while(condition) {
    // do something
}

for Loop

for(initialisation; condition; updation) {
    // do something
}

do while Loop

do {
    // do something
} while(condition);

break Statement

To exit the loop

break;

continue Statement

To skip an iteration

continue;