JavaScript Object.defineProperties() MethodThe Object.defineProperties() method defines new or modifies existing properties directly on an object, and returning the object. Syntax:ParameterObj: The object on which to define or modify properties. Props: An object whose own enumerable properties constitute descriptors for the properties to be defined or modified. Return:This method reruns an object that was passed to the function. Browser Support:
Example 1Output: 44 Example 2Output: 423 Example 3Output: 423 12
Next TopicJavaScript Objects
|