Prototype chain(JavaScript)

The prototype chain in JavaScript is the mechanism by which object properties are accessed, where if a property does not exist on an object, the search moves up to the object’s prototype (parent object) and continues up the chain until the property is found or until the top of the chain is reached, at which point undefined is returned.