Every single javascript object created, automatically comes with a __proto__ property. By giving assigning a new function sayHi to Object.prototype , every subsequent object that is created will automatically have that function. The usefulness is entirely up to you to decide. But before you go ahead and make use of __ proto__ in your production apps, do note that it has since been deprecated.

5m read timeFrom medium.com
Post cover image
5 Comments

Sort: