Open your favourite browser (mine is Chrome) open inspect window(ctrl+shift+i is the shorcut on windows) and click on console. And create an array like the screenshot shown below.
Observe the Image carefully, we just created an array named arr and in the next line if we type arr followed by a “.” then we are listed with set of functions which can be used with the arrays like map, concat, length etc.
So if you try to log arr.__proto__ output will look like below.
Array was able to access methods like push, length, find etc because of this. What do we get if we try to print Array.Prototype ?
If you observer carefully in above two screenshots the last parameter is __proto__. In first image we logged arr.__proto__ which has a __proto__ property within it. Let’s try logging the value of it.
Observe the constructor here, it is an object, that means Array’s prototype was derived from the Object’s prototype. What will be objects’s prototype then ? that is a.__proto__.__proto__.__proto__
Just to elucidate further consider below example with functions.