2

I'm learning Javascript recently.

When I read the chapter about "prototype chain", I still think I can master it.

prototype pic

But when I saw this picture, I was really confused.

How should I understand the

Function.__proto__ === Function.prototype

?

There is a saying "In javascript almost everything is inherited from Object except primitive types."

I usually think function is used to "construct" an instance while object is already an instance, so how could they be equal?

CrayonApe
  • 383
  • 2
  • 12
  • 2
    `Function` is a function. A function's prototype is `Function.prototype`. – PeterMader Aug 10 '17 at 11:20
  • 1
    in JS every `function` is actually a `Function Object` The real difficulty lies within the ambiguity of `objects`. They can be instances and constructors – Bee157 Aug 10 '17 at 11:20
  • Does this help? https://stackoverflow.com/questions/21319594/javascript-function-prototype-object-function-or-both – Bergi Aug 10 '17 at 12:29

0 Answers0