构造函数 原型对象 实例
构造函数
function Myfun(){
this.height=170
this.weight=100
}
原型对象
Myfun.prototype.name="小林"
实例
var Myfuns=new Myfun()
console.log(Myfuns.height)//170
console.log(Myfuns.name)//小林
构造函数
function Myfun(){
this.height=170
this.weight=100
}
原型对象
Myfun.prototype.name="小林"
实例
var Myfuns=new Myfun()
console.log(Myfuns.height)//170
console.log(Myfuns.name)//小林