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

The static **`Reflect.has()`** method works like the [`in` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in)
as a function.

## Syntax

```js
Reflect.has(target, propertyKey)
```

### Parameters

- `target`
  - : The target object in which to look for the property.
- `propertyKey`
  - : The name of the property to check.

### Return value

A `Boolean` indicating whether or not the `target`
has the property.

### Exceptions

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

## Description

The `Reflect.has` method allows you to check if a property is in an object.
It works like the [`in` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in)
as a function.
