Object isSealed() method

Find all information about the JavaScript isSealed() method of the Object object

Accept an object as a parameter, and then returntrueIf the object is sealed,falseotherwise. When the object is the return value of the object, the object will be sealedObject.seal()Features.


const dog = {}
dog.breed = 'Siberian Husky'
const myDog = Object.seal(dog)
Object.isSealed(dog) //true
Object.isSealed(myDog) //true
dog === myDog //true

In the example, bothdogwithmyDogIs sealed. The parameter is passed as a parameter toObject.seal()It is abrupt and cannot be sealed. It is also returned as a parameter, sodog===myDog(This is the exact same object).

Download mine for freeJavaScript beginner's manual

More js tutorials: