Javatpoint Logo
Javatpoint Logo

JavaScript Object.seal() Method

The 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:

Chrome 6
Edge Yes
Firefox 4
Opera 12

Example 1

Output:

"carry"

Example 2

Output:

 45

Example 3

Output:

45
45
67

Next TopicJavaScript Objects




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


B.Tech / MCA