What is the prototype of an object in JavaScript?

  • __proto__
  • prototype
  • base
  • parent
In JavaScript, the __proto__ property is a reference to the prototype object that an object inherits from. It is an internal property and can be accessed using object.__proto__. The prototype property, on the other hand, is a property of constructor functions and is used to define the prototype for objects created using that constructor. The other options are not commonly used for this purpose.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *