Determines whether an object exists in another object’s prototype chain.
isPrototypeOf(object)
object
Another object whose prototype chain is to be checked.
true if the object exists in the prototype chain of the specified object; otherwise, false.
let vehicle = {
speed: 10,
unit: "km/h",
}
let car = Object.create(vehicle)
vehicle.isPrototypeOf(car)
true