谁能向我解释为什么以下的守则样本是真实的? 我本会认为,如同在C#中那样,测试1! 测试2。
<>Update: 因此,我认为,我将得到一些独特的识别资料,储存在测试1和测试2的基础。
function Test1() { };
function Test2() { };
var test1 = new Test1();
var test2 = new Test2();
var dict = new Array();
dict[test1] = true;
alert(dict[test2]);