为什么下面的JavaScript
Math instanceof Math
抛出错误
TypeError: Expecting a function in instanceof check, but got #<Object>
发布于 2013-01-26 21:31:37
因为与Object不同,Math不是构造函数。
Object
Math
请参阅instanceof
instanceof
语法
构造函数的对象实例
参数
object:要测试的对象。
object
constructor:针对进行测试的函数
constructor
https://stackoverflow.com/questions/14537398
相似问题