Do you know how it works? - JavaScript Prototype and __proto__

TL;DR:
In JavaScript, all inheritance is prototypal — meaning every object inherits from another object via a chain called __proto__. Behind the scenes, even classes and arrays rely on this mechani...