摘要:
instanceof 运算符用于检测构造函数的 prototype 属性是否出现在某个实例对象的原型链上。 object instanceof constructor typeof 运算符返回一个字符串,表示操作数的类型。 typeof operand console.log(' instanceo 阅读全文
摘要:
hasOwnProperty 检查对象是否含有某个属性,无法检查其原型链上是否含有该属性 isPrototypeOf 检查一个对象是否存在于另一个对象的原型链上,比如parent.isPrototypeof(child)检查 parent 对象是否在 child 对象的原型链上 console.lo 阅读全文