---
hide_title: false
hide_table_of_contents: false
pagination_next: null
pagination_prev: null
---
# Reflect.defineProperty()

The static **`Reflect.defineProperty()`** method is like
[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) but returns a `Boolean`.

## Syntax

```js
Reflect.defineProperty(target, propertyKey, attributes)
```

### Parameters

- `target`
  - : The target object on which to define the property.
- `propertyKey`
  - : The name of the property to be defined or modified.
- `attributes`
  - : The attributes for the property being defined or modified.

### Return value

A `Boolean` indicating whether or not the property was successfully
defined.

### Exceptions

A [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an
`Object`.

## Description

The `Reflect.defineProperty` method allows precise addition to or
modification of a property on an object. For more details, see the
[`Object.defineProperty`](../../globals/Object/defineProperty.mdx) which is similar.

> **Note:** `Object.defineProperty` returns the
> object or throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the property has not been successfully
> defined. `Reflect.defineProperty`, however, returns a `Boolean`
> indicating whether or not the property was successfully defined.
