An enumerable property is eligible for inclusion in specified object iteration and copying operations. Properties created with Object.defineProperty are non-enumerable by default; set enumerable: true in the descriptor to include one. Non-enumerable properties are excluded from Object.keys, Object.values, Object.entries, for…in, for…of, JSON.stringify, Object.assign, and object spread. Enumerable symbol-keyed properties are still ignored by loops and methods such as Object.keys and JSON.stringify. section 9.1.2
// Object from Listing 9.1 Object.keys(ninjaCollection) > [ 'ninjas', 'firstNinja' ] // Object from Listing 9.2 Object.keys(ninjaCollection) > [ 'ninjas' ]
Compare Object.keys results to see how a property’s enumerability changes which keys are returned. section 9.1.2


