
function Person(name){
this.name = name;
}
Person.prototype.each = function () {
console.log('吃东西');
}
var xiaoming = new Person('小明')
Person构造函数;不是很明白this是怎么样指向Person构造函数,this是一个对象,又不是实例的一个属性怎么样指向Perosn构造函数呢?大神们能不能给小弟画一下图说明一下;
三国纷争
慕勒3428872
随时随地看视频慕课网APP
相关分类