Understanding how javascript hashtables work
<p>Could anyone explain to me why the code sample below reports true? I would have assumed that like in C# the instance of Test1 != instance of Test2.</p>

<p><strong>Update:</strong> So I think I will go with some unique identifier stored in the base of both Test1 and Test2.</p>

<pre><code>function Test1() { };

function Test2() { };

var test1 = new Test1();

var test2 = new Test2();

var dict = new Array();

dict[test1] = true;

alert(dict[test2]);
</code></pre>
