newfunctionStudent(name){this.name=name}varstu=newStudent('tao')newfunctionStudent(name){//js会创建的原理atemporaryobject保存stu的属性//vartemp={}//Changethistopoint//this=temp//改变原型//this.__proto__=Student.prototypethis.name=name//然后返回thisstu//返回这个}

newfunctionStudent(name){this.name=name}varstu=newStudent('tao')newfunctionStudent(name){//js会创建的原理atemporaryobject保存stu的属性//vartemp={}//Changethistopoint//this=temp//改变原型//this.__proto__=Student.prototypethis.name=name//然后返回thisstu//返回这个}