Javatpoint Logo
Javatpoint Logo

JavaScript Object.getPrototypeOf() Method

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:

true

Example 2

Output:

true
false

Example 3

Output:

true
true

Next TopicJavaScript Objects




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA