Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
isFrozen(object)
object
An object.
true if the object is frozen, otherwise false.
let obj = {}
Object.freeze(obj)
Object.isFrozen(obj)
true
let obj = {}
Object.isFrozen(obj)
false
let obj = {}
Object.preventExtensions(obj)
Object.isFrozen(obj)
false