# The Object propertyIsEnumerable() method

> Learn how the JavaScript propertyIsEnumerable() method checks whether a property exists on an object and is enumerable, returning true or false.

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

Called on an object instance, accepts a string as argument. If the object has a property with the name contained in the string argument, and that property is enumerable, it returns `true`. Otherwise it returns `false`.

Example:

```js
const person = { name: 'Fred' }

Object.defineProperty(person, 'age', {
  value: 87,
  enumerable: false
})

person.propertyIsEnumerable('name') //true
person.propertyIsEnumerable('age') //false
```
