JavaScript Reflect.set() methodThe static Reflect.set() method is used to set the value of an object's property. It returns true if the property was successfully set. Otherwise, it returns false. Syntax:Parameters:Obj: It is the target object on which to set the property. Key: It is the name of the property to set. value: It is the value to set. Receiver: It is the value of this provided for the call to target if a setter is encountered. Return value:This method returns a Boolean which indicates whether or not setting the property was successful. Exceptions:A TypeError, if the target is not an Object. Browser Support:
Example 1Output: "gosse" Example 2Output: 32 Example 3Output: 7 4 Next TopicJavaScript Reflect |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India