获取某个对象的原型对象

index.js

function Person() {}
Person.prototype.sayHello = function () {};

console.log(Object.getPrototypeOf(new Person())); // {sayHello: ƒ, constructor: ƒ}

posted on 2021-09-10 09:53  aisowe  阅读(52)  评论(0编辑  收藏  举报

导航