function Cat (name,age) {
this.name = name;
this.age = age;
}
Cat.prototype.type = "猫科动物";
Cat.prototype = {
say:function(){
console.log("喵咪~~~");
},
run:function(r){
console.log("我的跑动速度是:"+r);
}
}
var c = new Cat();
function Cat (name,age) {
this.name = name;
this.age = age;
}
Cat.prototype.type = "猫科动物";
Cat.prototype = {
say:function(){
console.log("喵咪~~~");
},
run:function(r){
console.log("我的跑动速度是:"+r);
}
}
var c = new Cat();