Q:

How to check a variable is a real object or just a reference to an object

Considering:
A = {};
A.test = 123;
B = A;
C = {};
for (key in A) C[key] = A[key]; // a crude clone.

In this example, B is a reference to A, C is a deep-copy of A.
I know I can check them by A === B and A === C
But if I don't have an A, can I distinguish "B" and "C" without knowing "A" ?

A:

There is no such thing as a "real object" in Javascript. A is also a reference.
If you examine B === C you will be able to find that they are separate objects but you won't be able to tell which one is the "original".

