Logo

Programming-Idioms

History of Idiom 13 > diff from v55 to v56

Edit summary for version 56 by MaterialTime:
[Dart] Update online demo

Version 55

2019-05-31, 20:51:41

Version 56

2019-05-31, 20:57:18

Idiom #13 Iterate over map keys and values

Print each key k with its value x from an associative array mymap

Illustration

Idiom #13 Iterate over map keys and values

Print each key k with its value x from an associative array mymap

Illustration
Extra Keywords
table dictionary hash traverse traversal
Extra Keywords
table dictionary hash traverse traversal
Code
mymap.forEach((k, v) => print('Key=$k, Value=$v'));
Code
mymap.forEach((k, v) => print('Key=$k, Value=$v'));
Demo URL
https://dartpad.dartlang.org/8a25c9342ce62745f0f3
Demo URL
https://dartpad.dartlang.org/7b1e631229109150ebe96c32d43f3abb