# The Object getOwnPropertyDescriptor() method

> Learn how the JavaScript Object.getOwnPropertyDescriptor() method returns the descriptor of a property, with its value, writable, enumerable, and configurable.

Author: [Flavio Copes](https://flaviocopes.com/about/) | Published: 2019-04-03 | Topics: [JavaScript](https://flaviocopes.com/tags/js/) | Canonical: https://flaviocopes.com/javascript-object-getownpropertydescriptor/

This method can be used to retrieve the descriptor of a specific property.

Usage:

```js
const propertyDescriptor = Object.getOwnPropertyDescriptor(object, propertyName)
```

Example:

```js
const dog = {}
Object.defineProperties(dog, {
  breed: {
    value: 'Siberian Husky'
  }
})
Object.getOwnPropertyDescriptor(dog, 'breed')
/*
{
  value: 'Siberian Husky',
  writable: false,
  enumerable: false,
  configurable: false
}
*/
```
