Skip to content

Instantly share code, notes, and snippets.

@Ertavf
Forked from chalin/main.dart
Created February 9, 2022 02:34
Show Gist options
  • Save Ertavf/c7ce7031c5f7e31eebbb3a66eed6cdcb to your computer and use it in GitHub Desktop.
Save Ertavf/c7ce7031c5f7e31eebbb3a66eed6cdcb to your computer and use it in GitHub Desktop.
Language Tour: Anonymous Function
void main() {
var list = ['apples', 'bananas', 'oranges'];
list.forEach((item) {
print('${list.indexOf(item)}: $item');
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment