Javatpoint Logo
Javatpoint Logo

JavaScript handler.getOwnPropertyDescriptor() Method

The handler.getOwnPropertyDescriptor() method is a trap for Object.getOwnPropertyDescriptor(). It exists as an own property of the target object and the target object is not extensible.

Syntax

Parameters

Target: The target object.

Prop: The name of the property whose description should be retrieved.

Return value

This method returns an object or undefined.

Browser Support

Chrome 49
Edge 12
Firefox 18
Opera 36

Example 1

Test it Now

Output:

Java Script is a scripting language

Example 2

Test it Now

Output:

Value : abc 10

Example 3

Test it Now

Output:

Java Script proxt : Own property 50

Next TopicJavaScript handler





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA