JavaScript: Prototype Chain
A object's parent of parent of parent etc forms a chain. This is called a prototype chain.
Note: the prototype chain is never circular, and is impossible to create circular prototype chain.
Note: not all objects have a parent, but buildin objects do (except Object.prototype
, which is the root, having parent of null
).
You can creat a object without parent by Object.create(null)
.
[see Object.create]
JavaScript Object and Inheritance
- Object Basics
- Object Overview
- Object Type
- Test If a Value is Object Type π
- Find Object's Type
- Prototype and Inheritance
- Prototype Chain
- Is in Prototype Chain?
- Get/Set Parent
- Show Parent Chain π
- Create Object
- Object Literal Expr
- Create Object + Parent
- Prevent Adding Property
- Clone Object π
- Test Object Equality π
- Add Method to Prototype