编辑代码

const myCreate =(obj)=>{
    const Func =function(){}
    Func.prototype= obj
    return new Func
}

const dog ={
    name:'土狗',
    jump:function(){
        console.log('你才是'+this.name)
    }
}

const tugou = myCreate(dog)

console.log(tugou.name)

tugou.jump()