JavaScript Object isExtensible() method
determines if an object is extensible

Object.isExtensible() static method determines if an object is extensible (whether it can have new properties added to it).

syntax ↴

Object.isExtensible(obj) ↴

obj The object which should be checked.

Object.isExtensible() returns true if an object is extensible.

Object.isExtensible() returns false if an object is not extensible.

Objects are extensible by default: they can have new properties added to them, and their [[Prototype]] can be re-assigned.

An object can be marked as non-extensible by using one of ↴

Object.preventExtensions()

Object.seal()

Object.freeze()

Reflect.preventExtensions()

Object.preventExtensions() prevents new properties from ever being added to an object.

syntax description
determine if myObject is extensible | toggle switch | to prevent extensions: ON/OFF ↴
Object.isExtensible(myObject)
⇑