mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-16 20:28:04 +01:00
Mainly to get rid of one top level directory. But this will also be useful when there are tests of the embedding API.
13 lines
317 B
Plaintext
13 lines
317 B
Plaintext
var map = {}
|
|
IO.print(map.count) // expect: 0
|
|
map["one"] = "value"
|
|
IO.print(map.count) // expect: 1
|
|
map["two"] = "value"
|
|
IO.print(map.count) // expect: 2
|
|
map["three"] = "value"
|
|
IO.print(map.count) // expect: 3
|
|
|
|
// Adding existing key does not increase count.
|
|
map["two"] = "new value"
|
|
IO.print(map.count) // expect: 3
|