📜  isPrototypeOf js - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:47.338000             🧑  作者: Mango

代码示例1
/"Checks if an object exists in another object's prototype chain."/

function Bird(name) {
  this.name = name;
}

let duck = new Bird("Donald");

Bird.prototype.isPrototypeOf(duck);
// returns true