![]() |
VOOZH | about |
JavaScript object.isSealed() method is used to determine if an object is sealed or not. An object is sealed if all of the below-mentioned conditions hold true :
Object.isSealed() takes the object as an argument that has to be checked and returns a boolean representing whether the object is sealed or not.
Syntax:
Object.isSealed(obj)
Parameters:
Return Value: Object.isSealed() returns a boolean representing whether the object is sealed or not.
Examples of the above function are provided below.
Example 1: In the above example the object has not been sealed using the Object.seal() method, therefore, it returns false when it is checked using Object.isSealed() method.
Output:
false
Example 2: In the above example the object has been sealed using the Object.seal() method, therefore, it returns true when it is checked using Object.isSealed() method.
Output:
true
Applications:
Exceptions :
We have a complete list of Javascript Object methods, to check those please go through this JavaScript Object Complete Reference article.
Supported Browsers: