Skip to content

Instantly share code, notes, and snippets.

@tailorvj
Last active April 7, 2020 06:40
Show Gist options
  • Save tailorvj/f61ccb283677aa552a8ba51a640f02d4 to your computer and use it in GitHub Desktop.
Save tailorvj/f61ccb283677aa552a8ba51a640f02d4 to your computer and use it in GitHub Desktop.
Dart: Lists are Iterable Collections
main() {
var list = ['Alpha', 'Beta', 'Gamma', 'Delta', 'Epsilon'];
for (var item in list){
print('${list.indexOf(item)}: $item');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment