The major difference between Map and WeakMap (as i thought) that:
If we have stored an object in Map and then later that object is not referenced to in other places, that object will still not be included in the garbage collection process and we still can access it in the Map.
But, if it is stored in WeakMap and then later that object is not referenced to somewhere else in the code, then it will be garbage collected.
Now looking at this example and the output i am getting it looks like even the object in Map which doesn't have a reference any longer somewhere else now is being garbage collected:
const userRoles = new Map();
let Corey = { name: "Corey", age: "40" };
userRoles.set(Corey, "Admin");
Corey = null;
console.log(userRoles.get(Corey)); // Undefined ??
Has the specifications changed because i can't see some kind of statement regarding that in MDN or have i misunderstood something?.