方式一:
module.exports = function(name, age) {
this.name = name;
this.age = age;
this.about = function() {
console.log(this.name +’ is ‘+ this.age +’ years old’);
};
};
方式二:
函数间直接使用函数名调用,不使用this、 或对象名前缀。
03-06
5万+
方式一:
module.exports = function(name, age) {
this.name = name;
this.age = age;
this.about = function() {
console.log(this.name +’ is ‘+ this.age +’ years old’);
};
};
方式二:
函数间直接使用函数名调用,不使用this、 或对象名前缀。