EDIT: my question is different from the one you're linking to. Specifically, it doesn't say whether objects can be reused by the JS virtual machine.
In Javascript, is it guaranteed that two objects created successively (and of course not by assigning one to another) have a different reference?
Consider the following snippet:
let a = {};
let b = {}; // b can be created at any time after a is created
let areEqual = a === b; // comparison can be done at any time after b is created
Is it guaranteed that areEqual
is false
? That some processor optimization won't make b
re-use a
's reference?