How Object Oriented works in JavaScript

Words
61
Reading
1 min
9y
Listen to this post
~1 min

Learn JavaScript Prototypes

What are Prototypes in JavaScript?

Prototypes are not classes, Inheritance in javascript works based on prototype delegations.

Prototypes are simple inheritance model that works based on delegation.

Class layer in javascript uses prototype under the hood.

Classes have been added because developers are used to classes and confused by prototypes but in reality, prototypes are
easier concept than classes.

Read more:
https://medium.com/@pedramphp/javascript-prototypes-e9afe15e3990

How Object Oriented works in JavaScript | Ecency