I'm struggling with some d3.js v4 troubleshooting and I suspect that some objects that I think are the same are not, in fact, the same object.
In Python I could do print("obj1:%s" % (id(obj1)))
, print("obj2:%s" % (id(obj2)))
.
That gives me the Python memory allocation for the object and if they match I know they are the same objects. Is there anything equivalent in JS?
This is related to How to know that javascript variable point to the same memory address, but unlike that case, both references are not in scope at the same time so I can't ===
them.