zaagan
7/11/2019 - 12:41 AM

Dart For Loop

Dart For Loop

/* Syntax */
for (initial_count_value; termination-condition; step) { 
   //statements 
}    
/* Example */
for (int i = 0; i < 5; i++) {
    print('hello ${i + 1}');
}
/* Output :  
    hello 1
    hello 2
    hello 3
*/