forked from Mirror/wren
Mainly to get rid of one top level directory. But this will also be useful when there are tests of the embedding API.
19 lines
424 B
Plaintext
19 lines
424 B
Plaintext
var map = {
|
|
"one": 1,
|
|
"two": 2,
|
|
"three": 3
|
|
}
|
|
|
|
IO.print(map.count) // expect: 3
|
|
IO.print(map.remove("two")) // expect: 2
|
|
IO.print(map.count) // expect: 2
|
|
IO.print(map.remove("three")) // expect: 3
|
|
IO.print(map.count) // expect: 1
|
|
|
|
// Remove an already removed entry.
|
|
IO.print(map.remove("two")) // expect: null
|
|
IO.print(map.count) // expect: 1
|
|
|
|
IO.print(map.remove("one")) // expect: 1
|
|
IO.print(map.count) // expect: 0
|