isPrototypeOfintermediate// Check prototype chain membership
const proto = {}
const child = Object.create(proto)
proto.isPrototypeOf(child) // β true
Object.prototype.isPrototypeOf(child) // β trueUse isPrototypeOf() to check whether an object exists anywhere in the prototype chain of another object.
instanceof checks if Constructor.prototype is in the chain. isPrototypeOf() is more flexible β you can check any object, not just constructor prototypes.
Challenge: Use isPrototypeOf() to replicate what instanceof checks.