Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

dart anonymous function in forEach

const list = ['apples', 'bananas', 'oranges'];
list.forEach((item) {
  print('${list.indexOf(item)}: $item');
});
Source by dart.dev #
 
PREVIOUS NEXT
Tagged: #dart #anonymous #function #forEach
ADD COMMENT
Topic
Name
3+6 =