JavaScript Reflect.preventExtensions() MethodThe static Reflect.preventExtensions() method is used prevent future extensions to the object. This method is same as Object.preventExtensions() method. Syntax:Parameters:Obj: It is the object on which to prevent extensions. Return value:This method returns true if the target was successfully set to prevent extensions. Otherwise, this method returns false. Exceptions:A TypeError, if the target is not an Object. Browser Support:
Example 1Output: true false Example 2Output: true true Example 3Output: false false 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