Category: ES5 (1)

JavaScript ES5: the Object.defineProperty() method

We can use the form: to get and set the value of an object: var obj = {a:1} in JavaScript. This is the most common and convenient way we code in JS, however the property that is created in this way can be easily modified and is enumerable. The Object.defineProperty() allows precise addition to or modification of a property on an object. It has been widely used in some popular two-way binding JS libraries.

Feb 9, 2017
Read More