Standard built-ins

Object.isFrozen()

Try the free JavaScript compiler

Tests non-extensibility, nonconfigurability of all own properties and nonwritability of all own data properties. Returns true for primitives.

Formal Syntax & Structure

javascript syntaxjavascript
Object.isFrozen(obj)

Parameters & Attributes

NameTypeDescription
objObjectTarget object.

Return Value

Boolean

Frozen status.

Working Example

Example Snippetjavascript
console.log(Object.isFrozen(Object.freeze({n:1})));
JavaScript Reference