Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns a Boolean value indicating whether a specified property is part of an object and if it is enumerable.
object.propertyIsEnumerable(propName)
Arguments
- object 
 Required. Instance of an object.
- propName 
 Required. String value of a property name.
Remarks
The propertyIsEnumerable property returns true if propName exists in object and can be enumerated using a For...In loop. The propertyIsEnumerable property 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 property does not consider objects in the prototype chain.
Example
The following example illustrates the use of the propertyIsEnumerable property.
var a = new Array("apple", "banana", "cactus");
var s = a.propertyIsEnumerable(1);
print (s);
The output of this program is as follows:
true
Requirements
Applies To:
See Also
Other Resources
Properties (Visual Studio - JScript)
Change History
| Date | History | Reason | 
|---|---|---|
| July 2009 | Modified example. | Content bug fix. | 
| March 2009 | Modified example. | Content bug fix. |