Object instanceof Object
true
Object instanceof Function
true
Function instanceof Object
true
Function instanceof Function
true
so if Function is a
I think this is more due to the unique way in which objects are defined. You don't define a type in javascript, you define a constructor. But you also do not define the constructor as a constructor, it's simply a function.
You can then refer to the types by the name of their constructor....which is just a function.
function Tiger(){ //function, or object?
}
function Apple(){ //function, or object?
}
Both could be objects, or perhaps just functions. Only the way you use them will determine that. So it kind of makes sense that at a low level, objects are functions and functions are objects, but there is still a difference, right?