Fork me on github
摘要: instanceof 运算符用于检测构造函数的 prototype 属性是否出现在某个实例对象的原型链上。 object instanceof constructor typeof 运算符返回一个字符串,表示操作数的类型。 typeof operand console.log(' instanceo 阅读全文
posted @ 2023-06-23 21:45 zjy4fun 阅读(5) 评论(0) 推荐(0) 编辑
摘要: hasOwnProperty 检查对象是否含有某个属性,无法检查其原型链上是否含有该属性 isPrototypeOf 检查一个对象是否存在于另一个对象的原型链上,比如parent.isPrototypeof(child)检查 parent 对象是否在 child 对象的原型链上 console.lo 阅读全文
posted @ 2023-06-23 21:23 zjy4fun 阅读(12) 评论(0) 推荐(0) 编辑