Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 341 Bytes

dart_loops_snippets.md

File metadata and controls

31 lines (24 loc) · 341 Bytes

Control Flows : Loops

while loop

while (!dreamsAchieved) {
  workHard();
}

do-while loop

do {
  workHard();
} while (!dreamsAchieved);

for loop

for(int i=0; i< 10; i++){
    print(i);
}

var numbers = [1,2,3];
// for-in loop for lists
for(var number in numbers){
    print(number);
}