Logo

Programming-Idioms

History of Idiom 13 > diff from v54 to v55

Edit summary for version 55 by MaterialTime:
[Dart] Prefer single quoted Strings as per Dart's Effective Dart guidelines at https://dart.dev/guides/language/effective-dart

Version 54

2019-05-31, 20:49:45

Version 55

2019-05-31, 20:51:41

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/8a25c9342ce62745f0f3