Javatpoint Logo
Javatpoint Logo

JavaScript Object.getOwnPropertyDescriptors() Method

The Object.getOwnPropertyDescriptors() method returns all own property descriptors of a given object. The difference between getOwnPropertyDescriptors() and getOwnPropertyDescriptor() method is that getOwnPropertyDescriptors() method ignores symbolic properties.

Syntax:

Parameter

obj: It is the object for which to get all own property descriptors.

Return:

This method returns an object which contains all own property descriptors of an object. This method might return an empty object if there are no properties.

Browser Support:

Chrome 54
Edge 15
Firefox 50
Opera 41

Example 1

Output:

103

Example 2

Output:

[object Object] {
  configurable: true,
  enumerable: true,
  value: 22,
  writable: true
}
true

Example 3

Output:

true
42 
23

Next TopicJavaScript Objects




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


B.Tech / MCA