JavaScript Object.preventExtensions() MethodThe Object.preventExtensions() only prevents the addition of new properties from ever being added to an object (i.e., prevents future extensions to the object). This change is a permanent that means once an object has been made non-extensible, it cannot make extensible again. Syntax:Parameter:obj: It is the object which should be made non-extensible. Return value:It returns the object being made non-extensible. Browser Support:
Example 1Output: false Example 2Output: false Example 3Output: false Next TopicJavaScript Objects |
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