title: Check if 2 JavaScript strings refer to the same object
body: <p>Is it possible to check whether 2 JavaScript strings refer to the same object (like checking equality of 2 non-primitive objects does)? </p>
  
  <p>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?</p>
  
  <p>Object trees are constructed dynamically, so there should be no problem with string interning in this case.</p>