Iterator
main () {
var names = ['Foo', 'Bar', 'Qux'];
for (var n in names) {
print(n);
}
print('----');
var it = names.iterator;
while (it.moveNext()) {
var n = it.current;
print(n);
}
}
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
main () {
var names = ['Foo', 'Bar', 'Qux'];
for (var n in names) {
print(n);
}
print('----');
var it = names.iterator;
while (it.moveNext()) {
var n = it.current;
print(n);
}
}