class Mammel {
constructor(legs){
this.legs = legs;
}
eat(){
console.log('eating...');
}
static count(){
console.log('static count...');
}
}
class Dog extends Mammel{
constructor(name, legs){
super(legs);
this.name = name;
}
sleep(){
super.eat();
console.log('sleeping');
}
}
let d = new Dog('fido', 4);
d.sleep();
d.eat();
console.log('d', d);