VOOZH about

URL: https://www.geeksforgeeks.org/javascript/javascript-object-getownpropertydescriptors-method/

⇱ JavaScript Object.getOwnPropertyDescriptors() Method - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

JavaScript Object.getOwnPropertyDescriptors() Method

Last Updated : 12 Jul, 2025

The Object.getOwnPropertyDescriptors() method in JavaScript is a standard built-in object which returns all property descriptors of a given object. 

Note: GetOwnPropertyDescriptors() ignores symbolic properties, as compared to getOwnPropertyDescriptor() which is the difference between the two methods.

Syntax:

Object.getOwnPropertyDescriptors( obj )

Parameters: This method accepts a single parameter as mentioned above and described below:

  • obj: This parameter holds the object for which all own property descriptors are to get.

Return value: This method returns an object containing all its own property descriptors of an object. This method may return an empty object for the object having no properties. 

The Below examples illustrate the Object.getOwnPropertyDescriptors() method in JavaScript: 

Example 1: In this example, we will see the basic use of the Object.getOwnPropertyDescriptors() method in JavaScript.

Output:

true
true
"GeeksforGeeks"
"Best Platform"
"And Computer science portal"

Example 2: In this example, we will see the basic use of the Object.getOwnPropertyDescriptors() method in JavaScript.

Output:

22
Object { value: 22, writable: true, enumerable: true, configurable: true }
true
true
" getOwnPropertyDescriptors"

We have a complete list of Javascript Object methods, to check those please go through this JavaScript Object Complete Reference article.

Supported Browsers: The browsers supported by Object.getOwnPropertyDescriptors() method are listed below:

  • Google Chrome 54 and above
  • Firefox 50 and above
  • Opera 41 and above
  • Safari 10 and above
  • Edge 15 and above
Comment