Before, I was a little confused about prototypal inheritance and identifier lookup in Javascript’s prototype chain,
For example, the following code:
I saw the following picture today:
Javascript object layout
Also, see in Javascript Object Hierarchy:
The prototype is only used for properties inherited by objects/instances created by that function. The function itself does not use the associated prototype.
In other words, the prototype of the function object does not affect the prototype chain search process,
I discovered today under firefox (because firefox exposed [[prototype]] through __proto__), what actually participates in identifier search is the __proto__ of the function object,
And, obviously:
In addition, it is also explained,