This language bar is your friend. Select your favorite languages!

Idiom #8 Initialize a new map (associative array)

Declare a new map object x, and provide some (key, value) pairs as initial content.

#Edit dateEdit SummaryEditor
👁 Δ 62 2019-10-14, 12:21 [Elixir] Dead link: play.elixirbyexample.com has been down for a while programming-idioms.org
👁 Δ 61 2019-09-30, 11:56 New VB implementation by user [Jak Drako] Jak Drako
👁 Δ 60 2019-09-29, 17:27 [Perl] add docs, more precise explanation daxim
👁 Δ 59 2019-09-27, 19:28 New C implementation by user [phrank] phrank
👁 Δ 58 2019-09-26, 22:32 [PHP] Format code snippet to PSR-12 ancarda
👁 Δ 57 2019-09-26, 22:15 New Kotlin implementation by user [miguel] miguel
👁 Δ 56 2019-09-26, 21:39 New Caml implementation by user [roryg] roryg
👁 Δ 55 2019-09-26, 19:50 [JS] Make more consistent with the other examples javajosh
👁 Δ 54 2019-09-26, 19:49 New JS implementation by user [javajosh] javajosh
👁 Δ 53 2019-09-26, 19:36 New Java implementation by user [scott_s] scott_s
👁 Δ 52 2019-09-26, 19:18 New Cpp implementation by user [testing] testing
👁 Δ 51 2019-09-26, 17:47 [JS] idiomatic syntax justafoo
👁 Δ 50 2019-09-26, 14:58 [JS] Add also values yuchi
👁 Δ 49 2019-09-26, 14:56 [JS] follow the standard "x" notation for variable names yuchi
👁 Δ 48 2019-09-26, 14:56 New JS implementation by user [yuchi] yuchi
👁 Δ 47 2019-09-26, 14:55 [JS] It is not JSON but actually a plain object literal in JavaScript yuchi
👁 Δ 46 2019-06-07, 10:26 [Haskell] Added import schuelermine
👁 Δ 45 2018-12-30, 11:42 [Go] gofmt programming-idioms.org
👁 Δ 44 2018-12-30, 11:40 [Rust] Fix demo programming-idioms.org
👁 Δ 43 2018-12-17, 18:14 [Rust] Added missing comma freecoder
👁 Δ 42 2018-12-17, 18:13 New Rust implementation by user [freecoder] freecoder
👁 Δ 41 2018-08-06, 15:37 Linked to idiom #172 [Insert entry in map] programming-idioms.org
👁 Δ 40 2017-09-01, 14:00 New Clojure implementation by user [Jerry] Jerry
👁 Δ 39 2017-03-20, 06:43 [Go] Consistent spacing. .
👁 Δ 38 2017-03-20, 06:42 [Python] Consistent spacing. .
👁 Δ 37 2016-11-30, 21:41 [Elixir] +DemoURL programming-idioms.org
👁 Δ 36 2016-11-29, 20:06 Restored version 33 programming-idioms.org
👁 Δ 35 2016-11-29, 03:15 [Python] lavi
👁 Δ 34 2016-11-29, 03:15 [Cpp] lavi
👁 Δ 33 2016-11-28, 22:30 [Ruby] +DemoURL programming-idioms.org
👁 Δ 32 2016-10-23, 21:15 Restored version 6 programming-idioms.org
👁 Δ 31 2016-10-23, 08:13 XOoUq9MzGjdt Loradae
👁 Δ 30 2016-06-13, 09:40 keywords: synonyms programming-idioms.org
👁 Δ 29 2016-06-13, 09:39 [Rust] Comment emphasize programming-idioms.org
👁 Δ 28 2016-04-14, 08:24 [Rust] Comment emphasize
👁 Δ 27 2016-04-14, 08:22 [Go] More concise Demo
👁 Δ 26 2016-04-13, 19:35 [Ruby] newer syntax
👁 Δ 25 2016-02-18, 16:57 New Scala implementation by user [meshelton]
👁 Δ 24 2016-02-16, 21:43 New Scala implementation by user [meshelton]
👁 Δ 23 2016-02-16, 17:51 New Csharp implementation by user [zehberk]
👁 Δ 22 2016-02-16, 17:21 New Ada implementation by user [Smaehtin]
👁 Δ 21 2016-02-16, 16:15 New Lua implementation by user [jparoz]
👁 Δ 20 2016-01-15, 09:57 Map -> map
👁 Δ 19 2015-11-30, 12:37 New Erlang implementation by user [elbrujohalcon]
👁 Δ 18 2015-11-18, 12:08 New Erlang implementation by user [elbrujohalcon]
👁 Δ 17 2015-10-29, 14:05
👁 Δ 16 2015-10-29, 13:03
👁 Δ 15 2015-10-26, 00:22
👁 Δ 14 2015-09-04, 19:42
👁 Δ 13 2015-09-03, 20:57
👁 Δ 12 2015-09-03, 20:57
👁 Δ 11 2015-09-03, 13:50
👁 Δ 10 2015-08-23, 23:44
👁 Δ 9 2015-08-21, 23:04
👁 Δ 8 2015-08-21, 23:04
👁 Δ 7 2015-08-21, 23:03
👁 Δ 6 2015-08-20, 18:33
👁 Δ 5 2015-08-20, 15:34
👁 Δ 4 2015-08-19, 14:08
👁 Δ 3 2015-07-31, 18:56
👁 Δ 2 2015-06-04, 19:22
1 2015-05-06, 21:04