Hi@akhtar,
As the name suggests Dart for in loop is also a loop but a bit different than conventional for loop. It is mainly used to iterate over array’s or collection’s elements. The advantage for in loop has over the conventional for loop is clean code means fewer chances of error and more productivity. You can see the below example.
void main() {
List subjects = ['Math', 'Biology', 'Economic', 'History', 'Science'];
for (String sName in subjects) {
print(sName);
}
}