JavaScript Classes vs Prototypes

Опубликовано: 22 Июль 2019
на канале: 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.


На этой странице сайта вы можете посмотреть видео онлайн JavaScript Classes vs Prototypes длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Steve Griffith - Prof3ssorSt3v3 22 Июль 2019, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 65,742 раз и оно понравилось 2.3 тысяч зрителям. Приятного просмотра!