Is it possible to check whether 2 JavaScript strings refer to the same object (like checking equality of 2 non-primitive objects does)?
When going through 2 object trees, I need to see if 2 objects are the same references or not. When those instances somewhere deep in those trees are strings, there seems to be no way to detect whether they are actually the same instances or just equal values. Or is there?
Object trees are constructed dynamically, so there should be no problem with string interning in this case.
javascripttried at Question?detect whether they are actually the same instances or just equal valuesAre you talking about references ?