📜  dart while break - Dart 代码示例

📅  最后修改于: 2022-03-11 14:48:04.052000             🧑  作者: Mango

代码示例1
void main() { 
   var i = 1; 
   while(i<=10) { 
      if (i % 1 == 0) { 
         print("The first multiple of 5  between 1 and 10 is : ${i}"); 
         break ;    
         //exit the loop if the first multiple is found 
      } 
      i++; 
   }
}