Associative array/Creation: Difference between revisions

No edit summary
Line 2,931:
writeLine(empty)
var longFruit = Map(int, text).of(1, "banana") # creates a map with the pair 1 => "banana"
longFruit[2] = "melon" # associates a key of 2 with "melongmelon"
longFruit.insert(3, "avocado")
writeLine(longFruit) # prints the map
224

edits