JavaScript Object.seal() MethodThe Object.seal() method of JavaScript seals an object which prevents new properties from being added to it and marks all existing properties as non-configurable. The object to be sealed is passed as an argument, and the method returns the object which has been sealed. Syntax:Parameter:obj: It is the object which should be sealed. Return value:The Object.sealed() method returns the object which has been sealed. Browser Support:
Example 1Output: "carry" Example 2Output: 45 Example 3Output: 45 45 67
Next TopicJavaScript Objects
|