Javascript Object getPrototypeOf() Method
JavaScript Object.getPrototypeOf() Method
Last Updated : 17 Mar 2025
The Object.getPrototypeOf() method of JavaScript returns the prototype (i.e. the value of the internal [[Prototype]] property) of the specified object.
Syntax:
Parameter
obj: It is an object whose prototype is to be returned.
Return value:
This method returns the prototype of the given object. If there are no inherited properties, this method will return null.
Browser Support:
| Chrome | 5 |
| Edge | Yes |
| Firefox | 3.5 |
| Opera | 12.1 |
Example 1
Output:
Example 2
Output:
Example 3
Output: