Home | Top | Web development | JavaScript Editor JavaScript EditorGet Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.


propertyIsEnumerable Property

Returns a Boolean value indicating whether a specified property is part of an object and if it is enumerable.
object.propertyIsEnumerable(proName)
Arguments
object
Required. Instance of an object.
proName
Required. String value of a property name.
Remarks
The propertyIsEnumerable property returns true if proName 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
function testIsEnumerable(){
var a = new Array("apple", "banana", "cactus");
return(a.propertyIsEnumerable(1));
}

Home | Top | Web development | JavaScript Editor JavaScript EditorGet Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.