function a (name,age){
this.name=name;
this.age=age;
this.say=function(){
console.log(age);
};
}
function b(){
this.eat=function(){
a.call(b);
}
}
var bb=new b();
bb.eat();来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/2231/viewspace-3122751/ ,如需转载,请注明出处,否则将追究法律责任。