JavaScript Object.isFrozen() Method
The Object.isFrozen() static method checks whether an object is frozen, meaning it can't be changed at all.
Description
The Object.isFrozen() static method tells you whether an object is frozen: not extensible, with all properties non-configurable and data properties non-writable. Primitive values such as numbers and strings always count as frozen.
An empty object that has been made non-extensible with Object.preventExtensions() also counts as frozen, because it has no properties that could change. Freezing is shallow, so isFrozen() only describes the object itself, not any objects stored in its properties.
The related checks are Object.isSealed(), for objects whose properties can't be added or removed, and Object.isExtensible(), which tells you whether new properties can be added at all.
Syntax
Object.isFrozen(obj)Parameters
- objThe object to work with.
Return Value
true if the object is frozen, otherwise false.
Example
Browser Support
The following information will show you the current browser support for the Object.isFrozen() method. Hover over a browser icon to see the version that first introduced support for this method.
Desktop





Tablets & Mobile





