【发布时间】:2015-12-15 11:14:42
【问题描述】:
请看下面的代码
function Abc(){}
Abc.prototype=new Array();
var arr= new Abc();
以下条件返回真..
1)Array.prototype.isPrototypeOf(arr);//true
2)arr instanceof Array //true
但是Object.prototype.toString.call(arr); 正在返回[object Object]
为什么返回 [object Object] 而不是 [object Array]?
谢谢!
【问题讨论】:
标签: javascript