Understanding JavaScript Property Descriptors 2

If this is your first time here, you should read the first post in this series. Then come back to this to continue. Continuing with the dive into property descriptors, this post goes deeply into the properties, what they mean and how they can be used. 1. Modifying existing properties The defineProperty method allows users to create and modify … Continue reading Understanding JavaScript Property Descriptors 2

Deep dive into JavaScript Property Descriptors

Creating Object Properties There are a couple of ways to assign properties to objects in JavaScript. The most common example is using obj.field = value or obj['field'] = value. This approach is simple however, it is not flexible because it automatically defines property descriptor fields In all 4 obj objects, the foo property returns the same result. But are they … Continue reading Deep dive into JavaScript Property Descriptors