var m = new Map();
var key1 = 'key1';
var key2 = {};
var key3 = {};
m.set(key1, 'value1');
m.set(key2, 'value2');
console.assert(m.has(key2), "m should contain key2.");
console.assert(!m.has(key3), "m should not contain key3.");
var o = new Object();
var key1 = 'key1';
var key2 = {};
var key3 = {};
o[key1] = 'value1';
o[key2] = 'value2';
console.assert(o.hasOwnProperty(key2), "o should contain key2.");
console.assert(!o.hasOwnProperty(key3), "o should not contain key3."); // Fails!