Dart Continue Statements

Vinit MepaniVinit Mepani
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.

0
Subscribe to my newsletter

Read articles from Vinit Mepani directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Vinit Mepani
Vinit Mepani

"Hello World, I'm Vinit Mepani, a coding virtuoso driven by passion, fueled by curiosity, and always poised to conquer challenges. Picture me as a digital explorer, navigating through the vast realms of code, forever in pursuit of innovation. In the enchanting kingdom of algorithms and syntax, I wield my keyboard as a magical wand, casting spells of logic and crafting solutions to digital enigmas. With each line of code, I embark on an odyssey of learning, embracing the ever-evolving landscape of technology. Eager to decode the secrets of the programming universe, I see challenges not as obstacles but as thrilling quests, opportunities to push boundaries and uncover new dimensions in the realm of possibilities. In this symphony of zeros and ones, I am Vinit Mepani, a coder by passion, an adventurer in the digital wilderness, and a seeker of knowledge in the enchanting world of code. Join me on this quest, and let's create digital wonders together!"