How Prototypes works in JavaScript
Inheritance in javascript works based on prototype delegations.
Prototypes is simple inheritance model that works based on delegation.
Class layer in javascript uses prototype under the hood.
read more at: https://medium.com/@pedramphp/javascript-prototypes-e9afe15e3990