ECMAScript defines several properties for each property found on objects, such as prototypes. One of them is the enumerable
property, and if it is set to false
, then this property will be skipped.
In fact, you can control these properties using the defineProperty
function:
This method allows you to precisely add or modify a property of an object. The usual addition of properties via assignment creates properties that are displayed during the enumeration of properties (for ... in a loop), the values ββof which can be changed and which can be deleted. This method allows you to modify these additional parts from their default values.
Martijn pieters
source share