JavaScript Classes vs Prototypes

Publicado em: 22 Julho 2019
no canal de: Steve Griffith - Prof3ssorSt3v3
65,742
2.3k

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.


Nesta página do site você pode assistir ao vídeo on-line JavaScript Classes vs Prototypes duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Steve Griffith - Prof3ssorSt3v3 22 Julho 2019, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 65,742 vezes e gostou 2.3 mil espectadores. Boa visualização!