https://danmartensen.svbtle.com/the-anatomy-of-a-javascript-function#creating-function-instances_3
I am trying to understand this article on how javascript function objects are created. It says:
The new instance object is implicitly assigned many internal properties, one being the [[prototype]] property. The Function constructor’s prototype property referencing it’s prototype object is copied into this new object’s [[prototype]] property
Basing on the above statement i wrote this code:
function Person(){
}
console.dir(Function.prototype);
console.dir(Person.prototype);
According to the statement Function.prototype is assigned to a newly created function object's prototpe (Person.prototype in this case). i printed both of them. Contents look different.
Can someone explain where my understanding went wrong. By the way i looked at Ecmascript specs as well, it has the same statement