99
JavaScript Object.defineProperties() Method
The Object.defineProperties() method defines new or modifies existing properties directly on an object, and returning the object.
Syntax:
Parameter
Obj: 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:
Chrome | Yes |
Edge | Yes |
Firefox | 1.5 |
Opera | Yes |
Example 1
Output:
44
Example 2
Output:
423
Example 3
Output:
423 12
Next TopicJavaScript Objects