原型与原型链

63 阅读1分钟

image.png

    function Person() { //构造函数

    }
    let a = new Person()
    console.log(a); //实例对象
    console.log(Person.prototype)//原型对象 也是祖先
    console.log(Person.prototype == a.__proto__); //true 
    
    
    
    

image.png