Object isFrozen() method

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

Accept an object as a parameter, and then returntrueIf the object is frozen,falseotherwise. Objects are frozen when their return valueObject.freeze()Features.


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

In the example, bothdogwithmyDogWas frozen. The parameter is passed as a parameter toObject.freeze()It is a sudden change and cannot be thawed. 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: