var map1 = new Map(); map1.set('bar', 'foo'); console.log(map1.get('bar')); // expected output: "foo" console.log(map1.get('baz')); // expected output: undefined