this page states:
Note: isPrototypeOf differs from instanceof operator. In the expression object instanceof AFunction, the object prototype chain is checked against AFunction.prototype, not against AFunction itself
Ok I don't really get what they are trying to tell us. Isn't object instanceof AFunction
exactly the same as `AFunction.prototype.isPrototypeOf(object)? or am I wrong?
Why do we need the isPrototypeOf
at all?
If i ever need to do p.isPrototypeOf(o)
couldn't I just do o instanceof p.constructor
?
Addtionally, is p.isPrototypeOf(o)
functionally equivalent to p===Object.getPrototypeOf(o)
?