Add containsKey() to Map, and validate key types.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
var map = {
|
||||
"one": 1,
|
||||
"two": 2,
|
||||
"three": 3
|
||||
}
|
||||
|
||||
IO.print(map.containsKey("one")) // expect: true
|
||||
IO.print(map.containsKey("two")) // expect: true
|
||||
IO.print(map.containsKey("three")) // expect: true
|
||||
IO.print(map.containsKey("four")) // expect: false
|
||||
IO.print(map.containsKey("five")) // expect: false
|
||||
Reference in New Issue
Block a user