JavaScript: Object.prototype.propertyIsEnumerable

By Xah Lee. Date: . Last updated: .
obj.propertyIsEnumerable( key )
Return true if value key is a own property key of the object obj and that property has enumerable attribute value of true. Else, false.

[see Property Attributes]

// check if a property is enumerable
const x4 = {"p":4};
console.log( x4.propertyIsEnumerable("p") ); // true
console.log( Object.getOwnPropertyDescriptor(x4, "p").enumerable ); // true
JS in Depth
XAH  BUY NOW

JS in Depth

JS Obj Ref

DOM


JS Obj Ref

Object Object

prototype