How to check a variable is a real object or just a reference to an object
<p>Considering:</p>

<pre><code>A = {};
A.test = 123;
B = A;
C = {};
for (key in A) C[key] = A[key]; // a crude clone.
</code></pre>

<p>In this example, B is a reference to A, C is a deep-copy of A.</p>

<p>I know I can check them by <code>A === B</code> and <code>A === C</code></p>

<p>But if I don't have an <code>A</code>, can I distinguish "B" and "C" without knowing "A" ?</p>
