Object.prototype is a JavaScript object that serves as the prototype of all JavaScript objects. In other words, it is an object from which other objects inherit properties and methods.
When you create a JavaScript object, it automatically inherits properties and methods from Object.prototype. For example, the toString() method is inherited from Object.prototype. This means that all JavaScript objects have access to the toString() method, which is used to convert an object into a string representation.
All JavaScript objects descend from Object.prototype
" proto : " (inherits the attributes of other objects)
Example code:
Top comments (0)