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.
isPrototypeOf() checks the entire chain, not just the immediate prototype. So if A β B β C, A.isPrototypeOf(C) returns true.
Challenge: Verify that isPrototypeOf works across multiple levels.