1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
js> var map = new java.util.HashMap();
js> map.put("a","hi");
null
js> map.put("b","hi");
null
js> map.get("a") == map.get("b")
true
js> map.put("c",1)
null
js> map.put("c",1)
1.0
js> map.put("d",1)
null
js> map.get("c") == map.get("d")
true
js> map.get("a") == map.get("d")
false
js> map.put("e","1")
null
js> map.get("d") == map.get("e")
true
js> map.put("f", true)
null
js> map.put("g", true)
null
js> map.get("f") == map.get("g")
true
js> var obj = {}
js> map.put("h", obj)
null
js> map.put("i", obj)
null
js> map.get("h") == map.get("i")
true
js> map.put("j", {})
null
js> map.get("i") == map.get("j")
false
|