Object.preventExtensions()
Term side of the Card
Topic: Object
Unit title: Object.preventExtensions()
Categories: Method
Explanation side of the Card
Explanation: The static method that prevents new properties from being added to an object. Once an object is made non-extensible, its shape cannot be altered by adding new properties, though existing properties can still be modified or deleted.
Browser compatibility:
- The chrome browser supports this feature starting from version 6
- The edge browser supports this feature starting from version 12
- The firefox browser supports this feature starting from version 4
- The safari browser supports this feature starting from version 5.1
Availability: