🔰prototype chain
JS ⟩ value ⟩ object ⟩ prototype ⟩ chain
the linked series of prototype objects of an object is called it's prototype chain.

prototype chain can't go in circles.
function's prototype (property) - new instances' prototype/parent object.
object's property - object's parent in prototype chain.
printPrototypeChain() - print the prototype chain of an object.
"obj instanceof A" checks if
A.prototypeis in the prototype chain ofobj.function's prototype is used in prototype chain.
method uses [[HomeObject]]'s prototype to trace super.
replit ⟩ class B extends A
ObjectPlayground - visualize prototype chain (cool ⭐️)
Last updated
Was this helpful?