mozilla

Compare Revisions

Object.prototype.propertyIsEnumerable()

Change Revisions

Revision 71766:

Revision 71766 by Sevenspade on

Revision 71767:

Revision 71767 by Sevenspade on

Title:
propertyIsEnumerable
propertyIsEnumerable
Slug:
JavaScript/Reference/Global_Objects/Object/propertyIsEnumerable
JavaScript/Reference/Global_Objects/Object/propertyIsEnumerable
Tags:
JavaScript, "JavaScript Reference"
JavaScript, "JavaScript Reference"
Content:

Revision 71766
Revision 71767
n74a.propertyIsEnumerable('constructor');   // returns falsen74a.propertyIsEnumerable('constructor');         // returns false
n76function myConstructor() {n76function firstConstructor() {
77  this.isnot = 'not enumerable';77  this.property = 'is not enumerable';
n81  this.is = 'is enumerable';n81  this.method = function method() {
82    return 'is enumerable';
83  };
n84secondConstructor.prototype = new myConstructor;n86secondConstructor.prototype = new firstConstructor;
n87o.prop = 'is';n89o.arbitraryProperty = 'is enumerable';
tt91o.propertyIsEnumerable('arbitraryProperty');   // returns true
89o.propertyIsEnumerable('is');      // returns true92o.propertyIsEnumerable('method');              // returns true
93o.propertyIsEnumerable('property');            // returns false
94 
95o.property = 'is enumerable';
96 
90o.propertyIsEnumerable('prop');    // returns true97o.propertyIsEnumerable('property');            // returns true
91o.propertyIsEnumerable('isnot');   // returns false

Back to History