JavaScript Classes #5: Polymorphism - JavaScript OOP Tutorial

Veröffentlicht am: 03 Juni 2018
auf dem Kanal: dcode
24,647
678

Polymorphism is the act of overriding methods within a derived class. Suppose you have a class called "CA" with a method "MA" on it - if you were to now create a child class of "CA" and then re-define the method "MA" on it, this would be polymorphism.

It is a commonly used technique when dealing with derived classes as in a lot of cases, the child class will be performing the same actions as its parent, but with a little extra.

In this video I take you through a simple example of polymorphism using the typical "Animal" class. I also demonstrate how you can call the parent-defined method through the use of "super".

For your reference, check this out:
https://developer.mozilla.org/en-US/d...

Support me on Patreon:
  / dcode  

Follow me on Twitter @dcode!

If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!


Auf dieser Seite können Sie das Online-Video JavaScript Classes #5: Polymorphism - JavaScript OOP Tutorial mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer dcode 03 Juni 2018 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 24,647 Mal angesehen und es wurde von 678 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!