2

Ok I have understanding that Function is an object in JavaScript and that is fine. that is why it exposes both Function.constructor and Function.prototype. Question is why Function's prototype is again a function ? This is confusing since prototypes in all other cases are objects and allow the inheritance. Is the Function.prototype a function for a specific reason or it is just some kind of legacy which does not really make sense.

Here is the example:

typeof(Object.prototype) "object"

typeof(Function.prototype) "function"

typeof(Number.prototype) "object"

Hivaga
  • 3,738
  • 4
  • 23
  • 36
  • "*prototypes in all other cases are objects*" - what's wrong, `Function.prototype` is an object as well? – Bergi Apr 10 '16 at 10:59

0 Answers0