Understanding the JavaScript Object’s Prototype

August 03, 2019

So, what actually __proto__ is?

This is a shorthand notation for the word prototype which can be considered as additional storage for an object, that contains the object’s metadata like some properties & methods.

Creating Custom Prototype Method

We already have a huge list of prototype methods, but what if we want to create our custom method?
ObjectName.prototype.FunctionName = function() { //this can have parameters as a normal function
 //function code

You Might Also Like