extend and override class Animal constructor id this id id print console log base this id end Class Animal class Dog extends Animal constructor id super id print console log id this id end class Dog let d1 new Dog 1 let d2 new Dog 2 d1 print d2 print let a1 new Animal 3 a1 print override but still extend call the base class Animal constructor id this id id print console log base this id end Class Animal class Dog extends Animal constructor id super id print console log id this id super print end class Dog let d1 new Dog 1 let d2 new Dog 2 d1 print d2 print explicit control over what methods gets called class Animal constructor id this id id print console log base this id end Class Animal class Dog extends Animal constructor id super id print console log id this id super print end class Dog let d1 new Dog 1 let d2 new Dog 2 d1 print d2 print force call the base for Dog Animal prototype print call d1 explicit control over what methods gets called class Animal constructor id this id id print console log base this id end Class Animal class Dog extends Animal constructor id super id this id Dog id only one this id print console log id this id super print end class Dog let d1 new Dog 1 let d2 new Dog 2 d1 print d2 print force call the base for Dog Animal prototype print call d1
this id id print console log base this id end Class Animal class Dog extends Animal constructor id super id print console log id this id super print end class Dog let d1 new Dog 1 let d2 new Dog 2 d1 print d2 print force call the base for Dog Animal prototype print call d1 explicit control over what methods gets called class Animal constructor id this id id print console log base this id end Class Animal class Dog extends Animal constructor id super id this id Dog id only one this id print console log id this id super print end class Dog let d1 new Dog 1 let d2 new Dog 2 d1 print d2 print force call the base for Dog Animal prototype print call d1