This tutorial discusses the differences in syntax between creating objects in javascript with the class keyword or with the prototype methods.
Examples are given of doing the exact same things with both versions.
It is important to understand that the class syntax is being interpreted as using the prototype syntax and that CLASSES do NOT exist in JavaScript.
Completed Code GIST: https://gist.github.com/prof3ssorSt3v...
Code Note: line 50 should be
Object.setPrototypeOf(EmployeeP.prototype, PersonP.prototype); //extends
We are setting the prototype of EmployeeP's prototype to link to the prototype of PersonP.
Auf dieser Seite können Sie das Online-Video JavaScript Classes vs Prototypes mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Steve Griffith - Prof3ssorSt3v3 22 Juli 2019 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 65,742 Mal angesehen und es wurde von 2.3 tausend den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!