我们可以Object.prototype.toString.call(foo)用来检测对象类(foo的类型),它运行良好.
Object.prototype.toString.call(foo)
但为什么Object.toString.call({})扔TypeError: Function.prototype.toString is not generic?
Object.toString.call({})
TypeError: Function.prototype.toString is not generic
不Object.toString继承Object.prototype吗?
Object.toString
Object.prototype
javascript
javascript ×1