RosettaCodeData/Task/Associative-array-Creation/MiniScript/associative-array-creation.mini
2023-07-01 13:44:08 -04:00

7 lines
184 B
Text

map = { 3: "test", "foo": 42 }
print map[3]
map[3] = "more tests"
print map[3]
print map["foo"]
print map.foo // same as map["foo"] (only for string keys that are valid identifiers)