I learnt that any function
type object has property prototype
.
For example:
Object
has propertyprototype
Function
has propertyprototype
Person
has propertyprototype
But,
> typeof Function.prototype
"function"
I have two questions,
1) why function
type object Function.prototype
does not have its own property prototype
, in the below visualisation?
2) Any object usually inherits from an object
type object, but in the below visualization, Function
object and Person
object inherit from function
type object Function.prototype
?
So, For above two questions, Is it more safe to have Function.protoype
as object
type?