Function.prototype // function Empty() {}
How does it make sense? For example, if we will take the Number
object, we can see that his prototype (Number.__proto__
) is Function.prototype
which includes method like apply
and call
. How can I use Number.apply(..)
if Number's prototype is an empty function and not a regular prototype object like all other prototype? (Number prototype, String prototype, any other custom prototype are an objects. even Object.prototype is an object).
After that, how does it make sense that Object.__proto__ == Function.prototype
? Object should be the highest object, how it inherits from Function.prototype
when Function
inherits from.. Object.prototype
!
Object instanceof Function // true
Function instanceof Object // of course true
Function instanceof Function // true