Possible Duplicate:
How can I get the memory address of a JavaScript variable?
Is there a way, in javascript, to print the reference of an array?
What I want to do is to check if two arrays have the same reference, and it can be done like this post suggests: How to check if two vars have the same reference?
But is it possible to print the reference, if for instance I’m working with an array?
Example
var Array1=["hi"];
var Array2=["hello"];
var thesame = Array1==Array2;
the same value is false.
But can I print he Array1 reference with somethink like window.alert(@Array1); in javascript?
–UPDATE —
What I exactly want is the actual address space being referenced.
Javascript implementations are only standardised in so much as they follow the ECMA spec. The intricacies of memory storage could differ by browser, and are not made accessible to JS.
As far as your question of why is concerned: JS is a lightweight scripting language. It makes sense to delegate memory management and optimization tasks to the platform, whereas it would require unnecessary hoop jumping to expose an interface for this to you.