Dart Continue Statements

Dart Continue Statements

ยท

1 min read

Continue keyword is use for to Continue the loop even condition is full fill.


void main() {

    // BREAK keyword
    for(var num = 0 ; num <=10 ; num++)
  {
    if(num == 8)
    {
      continue;
    }
      print(num);

  }
}

  • The above example display that when our condition meet then the loop not stop but they skip this value and run the loop till the end.

  • Like here , we write condition that if num == 8 then continue , so here we can see that number 8 is not printed in output.

ย