-
In short. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The prototype object has prototype of its own and so on until an object is reached with null as its prototype. So, this linking with one another is called as prototype chain.Null has no prototype and it acts as a final link in this prototype chain. |
Beta Was this translation helpful? Give feedback.
-
The prototype of an object would also have a prototype object. This continues until we reach the top level when there is no prototype object. This is called prototype chaining or prototype chain in JavaScript. The properties defined on the prototype objects are also accessible to the object instance. |
Beta Was this translation helpful? Give feedback.
The prototype object has prototype of its own and so on until an object is reached with null as its prototype. So, this linking with one another is called as prototype chain.Null has no prototype and it acts as a final link in this prototype chain.