Hash Tables & JavaScript Objects
What will this code output and why?
const table = new Map();
const key1 = { id: 1 };
const key2 = { id: 1 };
table.set(key1, 'value1');
console.log(table.get(key2));
const table = new Map();
const key1 = { id: 1 };
const key2 = { id: 1 };
table.set(key1, 'value1');
console.log(table.get(key2));