RosettaCodeData/Task/Collections/Sidef/collections-2.sidef
2016-12-05 23:44:36 +01:00

5 lines
189 B
Text

# creating an empty hash
var h = Hash() #=> Hash()
h{:foo} = 1 #=> Hash("foo"=>1)
h{:bar} = 2.4 #=> Hash("foo"=>1, "bar"=>2.4)
h{:bar} += 3 #=> Hash("foo"=>1, "bar"=>5.4)