在下面的例子中:<script> var person = { toLocaleString: function () { return "Nikolaos"; }, toString: function () { return "Nicholas"; } }; var person2 = { toLocaleString: function () { return "Grigorios"; }, toString: function () { return "Greg"; } }; var people = [person, person2]; alert(people); toLocaleString()方法在toString()方法之前,为什么弹出的结果是: Nicholas,Greg 请各位老师指点,多谢!
添加回答
举报
0/150
提交
取消