MSDN Library

propertyIsEnumerable Method (JavaScript)

Returns a Boolean value indicating whether a specified property is part of an object and if it is enumerable.



Required. Instance of an object.


Required. String value of a property name.

The propertyIsEnumerable method returns true if proName exists in object and can be enumerated using a ForIn loop. The propertyIsEnumerable method returns false if object does not have a property of the specified name or if the specified property is not enumerable. Typically, predefined properties are not enumerable while user-defined properties are always enumerable.

The propertyIsEnumerable method does not consider objects in the prototype chain.

function testIsEnumerable(){
  var a = new Array("apple", "banana", "cactus");

Supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards. See Version Information.

Applies To: Object Object (JavaScript)

© 2016 Microsoft